2008-10-27 Thomas Thurman <tthurman@gnome.org>
* src/core/prefs.c (titlebar_handler, handle_preference_update_enum):
Add initialisation which I missed on the previous checkin. Also
an extra comment.
svn path=/trunk/; revision=4004
2008-10-27 Brian Cameron <brian.cameron@sun.com>
Fix some crashes with the new GDM 2.24. Closes#558058.
* src/ui/ui.c (meta_ui_parse_modifier): another null check
* src/core/prefs.c (titlebar_handler, button_layout_handler):
more null checks.
svn path=/trunk/; revision=4003
2008-10-23 Thomas Thurman <tthurman@gnome.org>
* src/core/schema-bindings.c: fix stupid thinko which
caused defaults to be incorrect
* src/include/window-bindings.h: "space" needs to be
lowercase
svn path=/trunk/; revision=3992
2008-10-23 Thomas Thurman <tthurman@gnome.org>
Support _NET_WM_STATE_STICKY (i.e. allow third-party apps to decide
whether a window is on all workspaces). Bug found by Ka-Hing
Cheung. Closes#557536.
* src/core/window.c (set_net_wm_state): report it
* src/core/window.c (meta_window_client_message): set sticky
if we receive it
* src/core/window-props.c: set sticky if we find it
* src/core/atomnames.h: add _NET_WM_STATE_STICKY
svn path=/trunk/; revision=3991
2008-10-22 Joe Marcus Clarke <marcus@freebsd.org>
* src/core/main.c (meta_finalize, sigterm_handler): new functions
* src/core/main.c (main): add sigterm_handler in case we receive
a SIGTERM. Closes#553980.
svn path=/trunk/; revision=3974
2008-10-22 Thomas Thurman <tthurman@gnome.org>
* src/core/window.c (meta_window_set_demands_attention): minimised
windows are necessarily obscured.
svn path=/trunk/; revision=3971
2008-10-22 Thomas Thurman <tthurman@gnome.org>
Slight transformation of the x-macros used in keybindings
to make them clearer: write handler names out in full
because the old suffix system was confusing to people
skim-reading, and switched the order of the last two
parameters so more would generally fit on a screen.
* src/core/keybindings.c, src/core/schema-bindings.c
src/core/prefs.c: sympathy changes
* src/core/window-bindings.h, src/core/screen-bindings.h:
transformation as above
svn path=/trunk/; revision=3970
2008-10-18 Thomas Thurman <tthurman@gnome.org>
During a discussion with Rodney Dawes about making life easier
for the translators, he pointed out that the short and long
forms of almost all the keybindings say much the same thing
in different words. I believe this is an unconscionable burden
to place on translators, and have therefore merged the short
and long descriptions into the short description. The long
is now a general explanation of the format, plus possibly a
notice about reversibility. Closes#469361, and should solve
the l10n issue previously mentioned.
* src/core/keybindings.c: reflect changes in *-bindings.h
* src/core/schema-bindings.c: reflect changes in *-bindings.h
* src/core/prefs.c: reflect changes in *-bindings.h
* src/core/window-bindings.h: Add flags field, always the same
currently, so that it's the same as screen-bindings.h.
Also, lose ONLY_BOUND_BY_DEFAULT, since we already had a
rather more elegant way to perform the same effect.
And merge the long and short descriptions.
* src/core/screen-bindings.h (, item): Merge the long and
short descriptions.
svn path=/trunk/; revision=3966
2008-10-15 Thomas Thurman <tthurman@gnome.org>
Since Patrick Niklaus's checkin of 2008-08-14 dealt with windows with
no icons not using fallback icons, we don't need fallback icons.
* src/ui/theme.h: remove fallback icons from struct.
* src/core/iconcache.c (meta_read_icons): don't look for fallbacks.
* src/*/ui.[ch] (meta_ui_get_fallback_icons): removed
* src/ui/theme-parser.c (typedef, parse_toplevel_element): don't
parse fallback specifications.
svn path=/trunk/; revision=3958
2008-10-12 Thomas Thurman <tthurman@gnome.org>
Make the bindings in src/core/*-bindings.h generate
GConf schemas too. Note that there's an i18n issue
(documented in schema-bindings.c) which will be fixed
next checkin.
* src/core/schema-bindings.c: major fixup to make it
ready for use as part of the actual build process.
* src/Makefile.am: added magic to make it call schema-bindings
after it builds it.
* src/core/window-bindings.h: added comments;
also, window menu was listed variously as alt-Space
and alt-Print; it should have been alt-Space.
* src/metacity.schemas.in.in: renamed from s/\.in$//,
sentinel added for the generated bindings,
warning at the top now untrue, and removed.
svn path=/trunk/; revision=3952
2008-10-12 Thomas Thurman <tthurman@gnome.org>
Fix annoying bug where alt-tab and friends would jump
backwards a space on initial movement.
* src/core/screen-bindings.h: although reversed bindings
are necessarily reversible, don't set both bits in the
constant, or when we test for them we'll get confused.
svn path=/trunk/; revision=3950
2008-10-12 Thomas Thurman <tthurman@gnome.org>
An attempt to make life a little easier for our beloved translators;
this has the same behaviour as before, but removes over thirty
translation strings.
* src/core/session.c (start_element_handler): all "attribute not found
on element" strings are identical
* src/ui/theme-parser.c (locate_attributes): allow attribute names to
be preceded with "!" (in the code) to show they're required.
(parse_aspect_ratio, parse_distance, parse_toplevel_element,
parse_style_element, parse_gradient_element, static, parse_border,
parse_style_set_element, parse_draw_op_element): use the new "!"
prefix for locate_attributes(), or in some cases just the identical
constant, for generating this error.
* src/ui/theme.c (check_state, meta_theme_validate): add
translator comments
* src/ui/resizepopup.c (update_size_window): add
translator comments
svn path=/trunk/; revision=3949
2008-10-06 William Lachance <wrlach@gmail.com>
Pass modified mouse button events down to panel windows
instead of dealing with them ourselves. Closes#554428.
* src/core/display.c (prefs_changed_callback): don't grab mouse
buttons on panels
* src/core/window.c (meta_window_new_with_attrs): ditto
svn path=/trunk/; revision=3942
2008-10-05 Thomas Thurman <tthurman@gnome.org>
Second half of the switch to using x-macros for keybindings so that
we don't have lots of places with the same information which must
stay in the same order. This time it's screen bindings.
* src/core/screen-bindings.h: New file, containing screen bindings.
* src/core/schema-bindings.c: added ability to output screen bindings.
* src/core/window-bindings.h: tiny tweak to comment
* src/core/keybindings.c: generate function prototypes using s-b.h;
several handlers modified to use ints rather than ints cast into
pointers, or renamed.
* src/include/prefs.h: generate names of bindings using s-b.h;
generate screen_handlers using s-b.h;
arguments to bindings are ints and not ints cast to pointers;
several handler functions renamed to consistent names.
* src/core/prefs.c (meta_prefs_set_num_workspaces, init_bindings):
generate screen_handlers using s-b.h;
generate screen_string_bindings using s-b.h (and add check for
null bindings in init_bindings to enable this simply).
svn path=/trunk/; revision=3941
2008-09-06 Thomas Thurman <tthurman@gnome.org>
An attempt to keep all information about window bindings
in the same place. Screen bindings to come.
* src/core/window-bindings.h: new file, list of all window bindings
* src/include/prefs.h: drop all the existing window-binding macros
* src/core/schema-bindings.c (): output all the schema blocks that
would appear in metacity.schema for these window bindings. This
ought to become part of the build process, and hopefully will soon.
When this works it will also close#469361.
* src/core/keybindings.c: generate handle_* prototypes using
x-macros; populate window_handlers using x-macros; rename several
functions to have consistent names; do_handle_move_to_workspace(),
handle_move_to_workspace_flip(), and handle_move_to_workspace() all
merged into handle_move_to_workspace.
* src/core/prefs.c: generate window_bindings and window_string_bindings
using x-macros; (meta_prefs_set_compositing_manager) fix unrelated
problem with use of GConf functions when GConf was disabled.
* src/core/core.c (meta_core_get_menu_accelerator): binding names
given as literals since this is the only place in the code they
now appear
svn path=/trunk/; revision=3860
2008-09-01 Thomas Thurman <tthurman@gnome.org>
* src/core/workspace.c: When a workspace's list of struts
is freed, free the struts too. Closes#549952, and #468075.
svn path=/trunk/; revision=3840
2008-09-01 Thomas Thurman <tthurman@gnome.org>
Add new move_to_center keybinding, requested by Khanh-Dang Nguyen
Thu Lam; closes#549979.
* src/include/prefs.h (void): add name of new binding
* src/core/prefs.c: added pref for it
* src/core/keybindings.c (handle_move_to_center): new function
* src/metacity.schemas.in: included new binding
svn path=/trunk/; revision=3839
2008-08-31 Thomas Thurman <tthurman@gnome.org>
* src/core/prefs.[ch] (meta_prefs_set_compositing_manager): new
function.
* src/core/main.c (meta_parse_options): turn the compositing
manager on or off as necessary.
svn path=/trunk/; revision=3838
2008-08-30 Thomas Thurman <tthurman@gnome.org>
* src/core/window.c (process_property_notify): moving all
messages about properties to the top, as a start at #549886
svn path=/trunk/; revision=3837
2008-08-18 Eric Piel <e.a.b.piel@tudelft.nl>
* src/core/workspace.c (ensure_work_areas_validated): add a copy of
each strut in a window to the workspace's strut list, instead of
using the copy in the list (which would mean it was double-freed).
Believed to fix#468075.
svn path=/trunk/; revision=3817
2008-08-16 Ted Percival <ted@midg3t.net>
Ensure the user_rect is set sanely for windows that start maximized.
Prevents maximized windows from warping across the screen.
Fixes bug #504692.
* src/core/window.c (save_user_placement): renamed version of
meta_window_save_user_rect().
* src/core/window.c (force_save_user_placement): similar, but will
always save user_rect even if the window is maximised or fullscreen.
* src/core/window.c (meta_window_move_resize_internal): unplaced
windows have force_save_user_placement() called instead of
save_user_placement().
svn path=/trunk/; revision=3816
2008-07-13 Thomas Thurman <tthurman@gnome.org>
* src/core/display.c (event_callback): meta_display_screen_for_root()
can return NULL, so check for that. Fixes#422242. Also tidying.
svn path=/trunk/; revision=3788
2008-07-13 Elijah Newren <newren gmail com>
* src/core/workspace.c (meta_workspace_free): Don't attempt to
double-free struts, edges and regions if work areas have already
been invalidated at the time of freeing a workspace.
Possible fix to #361804.
svn path=/trunk/; revision=3787
2008-07-12 Thomas Thurman <tthurman@gnome.org>
* src/core/group.c (meta_window_get_group): This function can now
officially return NULL.
* src/core/window.c (meta_window_same_application): Two windows can't
belong to the same application unless they both belong to some
application. (Both belonging to no application is not the same.)
Closes#453022.
svn path=/trunk/; revision=3785
2008-06-30 Thomas Thurman <tthurman@gnome.org>
* src/core/bell.[ch]: Move comments for non-statics from the .c to .h.
* Doxyfile: adapt better for C, and make quiet.
svn path=/trunk/; revision=3777
2008-06-29 Thomas Thurman <tthurman@gnome.org>
Allow toggling of non-compositor effects (since there's a
non-Metacity key to do so: /desktop/gnome/interface/enable_animations).
Closes#92867.
* src/include/prefs.h: add META_PREFS_GNOME_ANIMATIONS key and
meta_prefs_get_gnome_animations() function
* src/include/prefs.c: added meta_prefs_get_gnome_animations()
function, and made supporting changes to structs.
* src/core/effects.c (run_handler): checked whether enable_animations
is set before running an effect.
* src/core/effects.c (meta_effect_run_minimize): remove debug message.
svn path=/trunk/; revision=3775
2008-06-29 Thomas Thurman <tthurman@gnome.org>
* src/core/stack.c (stack_sync_to_server): lose meta prefix
since it's static.
* src/core/stack.c (meta_stack_remove, stack_do_window_deletions):
replace our own cast with glib macro designed to do the same thing
svn path=/trunk/; revision=3773
2008-06-28 Thomas Thurman <tthurman@gnome.org>
* src/core/display.c, src/compositor/compositor-xrender.c: add checks
for HAVE_SHAPE where appropriate.
* src/core/xprops.c: fix type error which was causing warnings.
svn path=/trunk/; revision=3772
2008-06-28 Thomas Thurman <tthurman@gnome.org>
Some refactoring, simplifying, and commenting of the non-composited
effects code. effects.c could still do with some polish, which will
come along later.
* src/core/effects.h (meta_push_effect_handler): removed since it's
never used and does nothing very useful.
* src/core/effects.h (meta_pop_effect_handler): removed since its
only effect is to crash the program.
* src/core/effects.h (META_MINIMIZE_ANIMATION_LENGTH,
META_SHADE_ANIMATION_LENGTH): move to effects.c because they're used
nowhere else.
* src/core/effects.c: there were three versions of the box-zoom effect.
Remove the one which was never used, and make only the ones which
are used with certain configure settings be compiled.
* src/core/effects.h (meta_effect_end): move to effects.c, make static,
and rename to effect_free.
* src/core/effects.h (meta_effects_draw_box_animation): move to
effects.c, make static, and rename to draw_box_animation.
* src/core/effects.h (MetaEffectType): remove the values which weren't
used.
* src/core/window.c (meta_window_shade): remove commented-out code to
call effect for shading.
* src/core/effects.h (MetaEffectFinish): remove useless MetaEffect
parameter.
* src/core/window.c (finish_minimize): remove MetaEffect parameter.
svn path=/trunk/; revision=3771
2008-06-26 Thomas Thurman <tthurman@gnome.org>
Refactor so the long scary stack functions are less long and scary:
* stack.c (stack_ensure_sorted): the five parts of this long function
broken out into the new functions stack_do_window_deletions,
stack_do_window_additions, stack_do_relayer, stack_do_constrain
(which was already separate: see next) and stack_do_resort.
* stack.c (constrain_stacking): renamed to stack_do_constrain.
* stack.c (stack_ignore_sorted): lose meta prefix since it's static.
svn path=/trunk/; revision=3768
2008-06-13 Thomas Thurman <tthurman@gnome.org>
* src/core/window-props.c: Some commenting.
* src/core/prefs.c: Added unified handling of integer preferences.
Re-ordered fields in existing preferences so that changing to
a union-based system will be easier in the future.
svn path=/trunk/; revision=3758
2008-06-10 Thomas Thurman <tthurman@gnome.org>
* test/tokentest: A preliminary attempt at a test for the
theme expression tokeniser.
svn path=/trunk/; revision=3753
2008-06-02 Thomas Thurman <tthurman@gnome.org>
* src/core/display.c: make sure compositor things don't get
compiled when we're not using the compositor.
svn path=/trunk/; revision=3748
2008-05-19 Iain Holmes <iain@gnome.org>
* src/include/frame.h
* src/include/display.h
* src/include/xprops.h
* src/include/compositor.h
* src/include/types.h
* src/include/window.h
* src/include/errors.h
* src/include/screen.h: New basic public API for compositor.
* src/compositor/*: Separate the compositor out into its own
separate
directory and set it up for backends. Initial XRender backend.
* src/core/compositor.[ch]: Remove
* src/core/frame.h
* src/core/screen.h
* src/core/display.h
* src/core/window.h: Rename to -private.h so as not to clash
with the
new files in include
* src/core/delete.c
* src/core/workspace.h
* src/core/stack.[ch]
* src/core/keybindings.[ch]
* src/core/errors.c
* src/core/effects.[ch]
* src/core/core.c
* src/core/group.h
* src/core/edge-resistance.[ch]
* src/core/window-props.[ch]
* src/core/constraints.h
* src/core/bell.[ch]
* src/core/iconcache.h
* src/core/session.[ch]
* src/core/main.c
* src/core/place.h
* src/core/xprops.c
* src/ui/tabpopup.c: Use the new -private headers
* src/core/display.c
* src/core/frame.c
* src/core/window.c
* src/core/screen.c: Add the API functions required by the
compositor
* src/Makefile.am: Relocate the new files
svn path=/trunk/; revision=3715