Commit Graph

1183 Commits

Author SHA1 Message Date
Elijah Newren
88b9efd0b7 Patch from Ed Catmur to fix keybindings with hex-values (coming from
2006-08-21  Elijah Newren  <newren gmail com>

	Patch from Ed Catmur to fix keybindings with hex-values (coming
	from special extended keyboard keys).  #140448.

	* src/keybindings.c (struct _MetaKeyBinding): change keycode from
	KeyCode to unsigned int (comment from Elijah: why???),
	(reload_keycodes): only grab keysyms for keybindings that have
	them, (count_bindings, rebuild_binding_table): bindings can be
	valid either due to a valid keysym or a valid keycode,
	(display_get_keybinding_action, meta_change_keygrab,
	process_tab_grab, process_workspace_switch_grab): handle keycode
	as well as keysym

	* src/prefs.[ch] (struct MetaKeyCombo, update_binding,
	update_list_binding): handle keycode as well as keysym

	* src/ui.[ch] (meta_ui_accelerator_parse): new function special
	cases strings of the form "0x[0-9a-fA-F]+" and otherwise calling
	gtk_accelerator_parse(), (meta_ui_parse_accelerator,
	meta_ui_parse_modifier): call meta_ui_accelerator_parse instead of
	gtk_accelerator_parse.
2006-08-21 19:06:26 +00:00
Elijah Newren
7489dbc34e Allow drags & resizes to be reverted by hitting escape. Based on patch
2006-08-21  Elijah Newren  <newren gmail com>

	Allow drags & resizes to be reverted by hitting escape.  Based on
	patch from Thomas Andersen.  #126497.

	* src/display.c (grab_op_is_mouse_only): new function,
	(meta_display_begin_grab_op): grab the keyboard when moving or
	resizing too so that we can get escape keypresses

	* src/display.h (struct _MetaDisplay): add a comment to remind
	that grab_was_cancelled is only used in wireframe mode

	* src/keybindings.[ch] (process_mouse_move_resize_grab): add new
	function for handling keypresses during mouse-only moving and
	resizing, (meta_window_grab_all_keys): add a timestamp parameter
	and pass it to meta_window_focus(),
	(meta_display_process_key_event): make sure
	process_mouse_move_resize_grab() gets called when needed,
	(process_keyboard_move_grab, process_keyboard_resize_grab):
	rearrange some code slightly and improve the comments to make it
	more readable
2006-08-21 18:38:21 +00:00
Elijah Newren
4c96afba71 Fix several bugs with handling of fullscreen windows, causing them to not
2006-08-21  Elijah Newren  <newren gmail com>

	Fix several bugs with handling of fullscreen windows, causing them
	to not actually be fullscreen.  #343115 (and also #346927,
	#350547, #351643, the recent additional WINE-related issue
	mentioned on the mailing list, and probably others...)

	* src/constraints.c (setup_constraint_info): if a window tries to
	resize to fullscreen-size and it has a fullscreen function but
	isn't actually marked as fullscreen then assist it by marking it
	as such, (constrain_fully_onscreen, constrain_titlebar_visible):
	ignore this constraint for fullscreen windows since such windows
	have a separate specialized constraint

	* src/stack.c (window_is_fullscreen_size, get_standalone_layer):
	remove the old window_is_fullscreen_size() hack for detecting
	windows to treat as fullscreen since it doesn't work well with the
	new constraints framework (i.e. we needed a slightly different
	hack)

	* src/window.[ch] (meta_window_new_with_addrs): shuffle the order
	of adding the window to the stack and moveresizing the window
	since moveresizing can cause stack changes if the window's initial
	size is fullscreen size, (meta_window_make_fullscreen,
	meta_window_make_fullscreen_internal): split
	meta_window_make_fullscreen() similar to meta_window_maximize() so
	that constraints can make use of it
2006-08-21 18:08:05 +00:00
Baptiste Mille-Mathias
7ea55a1e54 Update the pixmap to a new one which fit better with the other pixmaps of
2006-08-19 Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>

        * src/stock_delete.png: Update the pixmap to a new one which
        fit better with the other pixmaps of the menu. First patch in
        metacity, woot! #345498
2006-08-20 19:44:52 +00:00
Elijah Newren
1f5130dc93 Patch from Willie Walker to restore the part of the patch that I should
2006-08-18  Elijah Newren  <newren gmail com>

	* src/tabpopup.c (meta_ui_tab_popup_new): Patch from Willie Walker
	to restore the part of the patch that I should not have reverted
	in #123372, in order to fix accessibility.  #350624
2006-08-18 17:32:58 +00:00
Elijah Newren
9051b70d40 Vytautus Liuolia totally rocks; he tested and debugged and tracked down
2006-08-07  Elijah Newren  <newren gmail com>

	* src/window.c (intervening_user_event_occurred): Vytautus Liuolia
	totally rocks; he tested and debugged and tracked down where we
	were using the focus window's net_wm_user_time even when it was
	uninitialized.  This may fix bug 311868 and others I've heard
	about (with Valknut, IIRC).  It definitely fixes the issues Vytas
	was seeing with his single instance library.  :-)
2006-08-09 18:32:30 +00:00
Elijah Newren
9fe845581b patch from Stéphane Rosi to allow moving maximized windows between
2006-08-07  Elijah Newren  <newren gmail com>

	* src/constraints.c (setup_constraint_info): patch from Stéphane
	Rosi to allow moving maximized windows between xineramas again.
	#323820
2006-08-08 00:36:04 +00:00
Elijah Newren
57bedc42a4 Add a constrain_titlebar_visible constraint; should fix both bug 333328
2006-08-07  Elijah Newren  <newren gmail com>

	Add a constrain_titlebar_visible constraint; should fix both bug
	333328 and bug 345522.  Not perfect (minor annoying snap pulling
	windows back onscreen, plus an ugly hack almost as bad as the old
	one), but tarballs are due in less than half an hour.  ;-)

	* src/boxes.[ch] (meta_rectangle_overlaps_with_region):
	new function

	* src/constraints.c (constrain_titlebar_visible): new function,
	  (enum ConstraintPriority, array all_constraints,
	  update_onscreen_requirements): various small changes to
	  accomodate the new function

	* src/edge-resistance.c: remove the infinite edge resistance,
	which was a big hack of a way to workaround the lack of a
	titlebar_visible constraint

	* src/window.[ch] (MetaWindow): new require_titlebar_visible
	bitfield, (meta_window_new_with_attrs): initialized here
2006-08-07 23:34:55 +00:00
Elijah Newren
acc6c97997 Patch from Chris Ball to not minimize in response to double clicks on the
2006-08-07  Elijah Newren  <newren gmail com>

	* src/frames.c (meta_frames_button_press_event): Patch from Chris
	Ball to not minimize in response to double clicks on the titlebar
	when minimiziation should not be allowed.  #347377
2006-08-07 22:06:25 +00:00
Elijah Newren
dcef402d68 Patch from Björn Lindqvist to fix button lighting with dragged clicks.
2006-08-07  Elijah Newren  <newren gmail com>

	Patch from Björn Lindqvist to fix button lighting with dragged
	clicks.  #321474.

	* src/frames.c (meta_frames_button_press_event): update the
	prelit_control, (meta_frames_button_release_event): some code
	refactoring to simplify things a bit, and make sure to update the
	prelit_control
2006-08-07 21:04:44 +00:00
Elijah Newren
d4973e8d1b Patch from Thomas Andersen to return the window to maximized state if the
2006-08-07  Elijah Newren  <newren gmail com>

	* src/keybindings.c (process_keyboard_move_grab): Patch from
	Thomas Andersen to return the window to maximized state if the
	window was "shaken loose" from maximized state during a resize but
	the resize is later aborted.  #346719.
2006-08-07 19:24:41 +00:00
Elijah Newren
1dd78e38ff Just a couple more details to explain why MetaButtonSpace is used 2006-08-07 18:20:37 +00:00
Elijah Newren
adc46fc970 Patch from Vytautas Liuolia to react to _NET_STARTUP_ID changes, as
2006-08-07  Elijah Newren  <newren gmail com>

	Patch from Vytautas Liuolia to react to _NET_STARTUP_ID changes,
	as proposed for the new startup-notification/EWMH spec.  #347515

	* src/window-props.c (reload_net_startup_id): be sure to act on
	the new id instead of just recording it

	* src/window.[ch] (window_activate, meta_window_activate,
	  meta_window_activate_with_workspace, meta_window_client_message):
	change window_activate() to take a workspace parameter instead of
	hardcoding to the current workspace, add
	meta_window_activate_with_workspace() function needed by
	reload_net_startup_id().
2006-08-07 18:08:27 +00:00
Thomas Thurman
cc5def1021 add new MetaButtonSpace struct; use it for close_rect, max_rect, min_rect
2006-08-07  Thomas Thurman  <thomas@thurman.org.uk>

        * src/frames.h: add new MetaButtonSpace struct; use it for
        close_rect, max_rect, min_rect and menu_rect.

        * src/frames.c (control_rect, get_control): modify to support
        the new fields in MetaButtonSpace.

        * src/theme.c (meta_frame_layout_get_borders, rect_for_function,
        meta_frame_layout_calc_geometry, button_rect): add support for
        the new fields in MetaButtonSpace.
2006-08-07 18:01:21 +00:00
Elijah Newren
77a331a1e3 patch from Dmitry Timoshkov to make sure window features get recalculated
2006-08-07  Elijah Newren  <newren gmail com>

	* src/screen.c (meta_screen_resize_func): patch from Dmitry
	Timoshkov to make sure window features get recalculated when the
	screen is resized via XRandR.  Part of #346927.
2006-08-07 17:18:33 +00:00
Elijah Newren
ae86fcd5b2 Fix ugly spacing 2006-08-04 22:33:42 +00:00
Elijah Newren
74d4768b8e Patch from Dmitry Timoshkov to fix the heuristic for determining if
2006-08-04  Elijah Newren  <newren gmail com>

	Patch from Dmitry Timoshkov to fix the heuristic for determining
	if windows can be made fullscreen (needed for WINE and possible
	also some legacy applications).  Part of #346927.

	* src/window.c (recalc_window_features): ignore window decoration
	when checking size for determing whether an unresizable window
	should be allowed ot be considered for fullscreening
2006-08-04 22:33:20 +00:00
Thomas James Alexander Thurman
e8fb842aad oops, forgot to add missing apostrophe. Punctuation is good. #336850. 2006-07-31 19:58:06 +00:00
Thomas James Alexander Thurman
76e4fd8a07 Make it so maximized windows do not have rounded corners. #336850. 2006-07-31 19:56:56 +00:00
Thomas James Alexander Thurman
7d8087f3e8 Fix another C89 vs. C99 issue. #347621. 2006-07-30 18:32:40 +00:00
Vincent Untz
419e063a24 also kill this
2006-07-26  Vincent Untz  <vuntz@gnome.org>

	* src/update-from-egg.sh: also kill this
2006-07-26 08:31:05 +00:00
Thomas James Alexander Thurman
05323ef21a #348633 2006-07-26 02:11:48 +00:00
Thomas James Alexander Thurman
6e4d6da191 Kill usage of libegg. #348633. 2006-07-26 02:06:17 +00:00
Björn Lindqvist
3d661f9bc7 Grab Alt+Shift+Button1 as well to partially fix operation ordering issues
2006-07-24  Björn Lindqvist  <bjourne@gmail.com>

	* src/display.c (meta_display_grab_window_buttons): Grab
	Alt+Shift+Button1 as well to partially fix operation ordering
	issues when trying to snap-move windows.  Part of #112478.
2006-07-24 17:15:32 +00:00
Thomas James Alexander Thurman
5e85bf7210 Avoid a case where a struct's fields might be updated after it was freed.
* ui.[ch] (filter_func): Avoid a case where a struct's
fields might be updated after it was freed. #348067.
2006-07-22 01:45:21 +00:00
Elijah Newren
bcbdfbe177 Patch from Aidan Delaney to tidy tabpopup.c by factoring out
2006-06-10  Elijah Newren  <newren gmail com>

	Patch from Aidan Delaney to tidy tabpopup.c by factoring out
	tab_entry_new().  #166890.

	* src/tabpopup.c (tab_entry_new): new function,
	(meta_ui_tab_popup_new): use tab_entry_new() to remove a big chunk
	of code, plus a few other small cleanups.
2006-06-11 02:44:55 +00:00
Søren Sandmann
4a06163710 Run an unminimize effect
Fri May 26 16:48:29 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/effects.c (meta_effect_run_unminimize): Run an unminimize effect

        * src/window.c (meta_window_unminimize): Store a "was_minimized"
        boolean in the window.

        * src/window.c (meta_window_show): If the window was minimized,
        run an unminimize animation.

        * src/c-window.c (meta_comp_window_run_unminimize): Add an
        unminimize animation, running the minimize one in reverse.
2006-05-26 20:50:34 +00:00
Søren Sandmann
83f82e5f28 Rename from _bounce() to _focus().
Fri May 26 14:55:07 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (meta_comp_window_run_focus): Rename from
        _bounce() to _focus().
2006-05-26 18:59:15 +00:00
Elijah Newren
db87abfb19 Fix a crash on exit/logout from assuming a compositor would always exist
2006-05-26  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_close): Fix a crash on exit/logout
	from assuming a compositor would always exist
2006-05-26 16:51:03 +00:00
Elijah Newren
a8f382019a Remove MetaWindowEdgePosition enum that isn't used anymore
2006-05-25  Elijah Newren  <newren gmail com>

	* src/place.h:
	* src/common.h:
	Remove MetaWindowEdgePosition enum that isn't used anymore
2006-05-26 00:16:52 +00:00
Søren Sandmann
a1324af018 Move duplicated window field outside the union
Thu May 25 15:56:43 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/effects.h (struct MetaEffect): Move duplicated window field
        outside the union

        * src/compositor.c: delete duplicated code to get at the window.
2006-05-25 19:59:20 +00:00
Søren Sandmann
ed37bcc258 Fix compilation in non-compositor case, by moving the stack functions into
Thu May 25 15:17:29 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c: Fix compilation in non-compositor case, by
        moving the stack functions into the HAVE_COMPOSITOR defines.
2006-05-25 19:18:34 +00:00
Søren Sandmann
cb84bc3e1d Add a destroy notifier to the window.
Thu May 25 15:11:58 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.h: Add a destroy notifier to the window.

        * src/c-screen.c (on_window_destroy): New function.

        * src/c-screen.c (meta_comp_screen_add_window): Use the destroy
        notifier here.

        * src/c-window.c (generate_phases): New function. Simplify the
        minimize animation a lot by generating all the rectangle
        information into an array, then processing that.
2006-05-25 19:14:29 +00:00
Adam Jackson
76dff49a3e Bounce on window focus. 2006-05-25 14:40:50 +00:00
Søren Sandmann
6dfb56cc77 Make sure windows are kept on top of the panel during minimize.
Wed May 24 22:15:01 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Make sure windows are kept on top
        of the panel during minimize.
2006-05-25 02:15:49 +00:00
Søren Sandmann
ab1adf6c06 Shrink the window instead of explode it.
Wed May 24 21:17:59 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Shrink the window instead of
        explode it.

        * src/compositor.c (do_effect): don't read the frame if it is
        NULL.

        * src/c-window.c (meta_comp_window_run_minimize): Resurrect the
        shrinking minimize animation.

        * src/c-window.c (meta_comp_window_fade_in): Make dialogs 90%
        translucent.

        * src/c-window.c (update_fade): End at end_fade, not 1.0.
2006-05-25 01:19:03 +00:00
Søren Sandmann
3ae4e25162 Add a fade-in animation when windows are mapped.
Wed May 24 19:15:45 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (cancel_fade): Add a fade-in animation when
        windows are mapped.
2006-05-24 23:16:31 +00:00
Søren Sandmann
7535f0f58a New function
Wed May 24 16:37:11 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (private_metacity_window): New function

        * src/c-window.c (meta_comp_window_refresh_attrs): Map metacity's
        own windows directly.
2006-05-24 20:38:56 +00:00
Søren Sandmann
ca3236f76c Add a stack-freeze feature to CWindow.
Wed May 24 14:36:42 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (meta_comp_window_{freeze,thaw}_stack: Add a
        stack-freeze feature to CWindow.

        * src/c-screen.c (meta_comp_screen_restack): Don't restack if the
        window is frozen.
2006-05-24 18:38:54 +00:00
Søren Sandmann
7d2f0bf1fe Fix compilation in the non-composited case.
Wed May 24 13:09:49 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c: Fix compilation in the non-composited case.
2006-05-24 17:10:31 +00:00
Søren Sandmann
3f4e194c8f return TRUE when the window is actually freed.
Wed May 24 12:57:32 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (meta_comp_window_free): return TRUE when the
        window is actually freed.

        * src/compositor.c (do_effect): Disable updating before exploding
        the window.

        * src/c-window.c: Make MetaCompWindow refcounted.

        * src/c-window.[ch]: New functions meta_comp_window_{show,hide}

        * src/c-screen.c (meta_comp_screen_unmap): Call
        meta_comp_window_hide() instead of directly setting the viewable
        status of the node.

        * src/c-screen.c (meta_comp_screen_remove_window): Only remove the
        window when it is actually freed.
2006-05-24 16:58:20 +00:00
Adam Jackson
22bc36eb3b Move shrink effect code from compositor.c to c-window.c. Stubs for
restore effect.  Notes in various places for where to hook in
other effects.
2006-05-23 21:42:34 +00:00
Søren Sandmann
7592470dab Also use explode when windows close.
Tue May 23 16:36:04 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Also use explode when windows close.

        * src/c-window.c (meta_comp_window_explode): Add refcounting to
        comp window, and use it in the explosion effect

        * src/effects.h (struct MetaEffect): Add new MetaCloseEffect.

        * src/display.c (event_callback): Run it from the UnmapNotify
        event handler.
2006-05-23 20:38:18 +00:00
Søren Sandmann
179987132c New function to send a sync request to newly mapped windows.
Tue May 23 15:23:58 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (send_sync_request): New function to send a sync
        request to newly mapped windows.
        (on_request_alarm): Show the window here.
2006-05-23 19:25:29 +00:00
Adam Jackson
1e64cf4a8b Add more effect tokens. 2006-05-23 18:22:09 +00:00
Søren Sandmann
3e5b9776c6 Beginning of new layer that abstracts transition effects.
Mon May 22 17:35:52 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/effects.[ch]: Beginning of new layer that abstracts
	transition effects.

	New functions:
	(meta_push_effect_handler): Install an effect handler
	(meta_pop_effect_handler): Remove last effect handler
	(meta_effect_run_minimize): Create a minimize effect and pass it
	to the handler.
	(meta_effect_end): Called by handler when the effect is finished.

	* src/compositor.c: Move explosion code form there to src/c-window.c.

	* src/c-screen.c: Delete explosion related code.
2006-05-22 21:46:14 +00:00
Björn Lindqvist
cdb94d7e57 Make mouse cursor when moving windows become a hand. Fixes #337376.
2006-05-22  Björn Lindqvist  <bjourne@gmail.com>

	* common.h (enum MetaCursor):
	* display.c (meta_display_create_x_cursor): Make mouse cursor when
	moving windows become a hand. Fixes #337376.
2006-05-22 16:12:28 +00:00
Björn Lindqvist
3e394580da Fix a logic bug so that the whole titlebar becomes sensitive to mouse
2006-05-19  Björn Lindqvist  <bjourne@gmail.com>

	* frames.c: Fix a logic bug so that the whole titlebar becomes
	sensitive to mouse clicks. Fixes #336320.
2006-05-19 13:15:29 +00:00
Björn Lindqvist
23a5f5bb58 Remove the unused attributes resize_gravity, width_inc, height_inc,
2006-05-18  Björn Lindqvist  <bjourne@gmail.com>

	* resizepopup.c: Remove the unused attributes resize_gravity,
	width_inc, height_inc, min_width, min_height, frame_left,
	frame_right, frame_top, frame_bottom, tick_origin_x, tick_origin_y
	from the MetaResizePopup struct. Delete all code that references
	those attributes.
2006-05-18 08:32:16 +00:00
Elijah Newren
1a16108310 Revert the accessibility module loading workaround from Gnome 2.6, since
2006-05-15  Elijah Newren  <newren gmail com>

	Revert the accessibility module loading workaround from Gnome
	2.6, since gtk+ has long since fixed this for us.  #123372.

	* src/Makefile.am: remove METACITY_LIBDIR define

	* src/main.c (find_accessibility_module,
	accessibility_invoke_module, accessibility_invoke, main): remove
	the first three of these functions and all calls to them

	* src/tabpopup.c (meta_ui_tab_popup_new): not sure if this part of
	120025 needed to be reverted but doing the reversion, if wrong, is
	the best way to get someone from the accessibility team to scream,
	er, I mean comment.  ;-)
2006-05-15 18:46:26 +00:00