Commit Graph

829 Commits

Author SHA1 Message Date
Elijah Newren
d0d0925e29 Choose correct window to focus when "un-showing" the desktop. Fixes
2004-06-24  Elijah Newren  <newren@math.utah.edu>

	* src/keybindings.c: (handle_toggle_desktop): Choose correct
	window to focus when "un-showing" the desktop.  Fixes #144900.
2004-06-24 20:47:31 +00:00
Elijah Newren
9d1d8fa062 Make choice of focus window be consistent for each focus mode. Fixes
2004-06-24  Elijah Newren  <newren@math.utah.edu>

	Make choice of focus window be consistent for each focus mode.
	Fixes #135810.

	* src/delete.c: (meta_window_delete): In some #if 0'ed code,
	replace meta_workspace_focus_mru_window with
	meta_workspace_focus_default_window (just in case the code becomes
	un-#if 0'ed out).

	* src/screen.c, src/screen.h: Change
	meta_screen_focus_mouse_window to meta_screen_get_mouse_window,
	and don't focus the window when found but rather return it.

	* src/window.c: (meta_window_free, meta_window_minimize): replace
	meta_workspace_focus_mru_window with
	meta_workspace_focus_default_window.

	* src/workspace.c: (meta_workspace_focus_default_window): Focus
	appropriately for the given focus method:
	   click-to-focus: focus MRU window (== toplevel window)
	   sloppy focus:   focus the window under the pointer if there is
	                   such a window, otherwise focus the mru window
	   mouse focus:    focus the window under the pointer if there is
	                   such a window, otherwise don't focus anything
2004-06-24 20:02:46 +00:00
Elijah Newren
702a4c0da7 Avoid a race condition on the choice of window to focus after the
2004-06-24  Elijah Newren  <newren@math.utah.edu>

	* src/window.c: Avoid a race condition on the choice of window to
	focus after the previously focused window gets closed or
	minimized.  Fixes #131582.
2004-06-24 19:41:02 +00:00
Elijah Newren
fe341bb927 make naming for "move a window"/"move the window"/"move window" more
2004-06-24  Elijah Newren  <newren@math.utah.edu>

	* src/metacity.schemas.in: make naming for "move a window"/"move
	the window"/"move window" more consistent.  Patch from Michael
	Terry for #142235.
2004-06-24 17:09:43 +00:00
Elijah Newren
8131988b5e Change meta_warning to meta_topic on failure to connect to a session
2004-06-24  Elijah Newren  <newren@math.utah.edu>

	* src/session.c: Change meta_warning to meta_topic on failure to
	connect to a session manager.  Fixes #136218.
2004-06-24 17:02:54 +00:00
Elijah Newren
28a54c6bb4 Add support for _NET_WM_USER_TIME
2004-06-17  Elijah Newren  <newren@math.utah.edu>

	Add support for _NET_WM_USER_TIME

	* src/display.c:
	(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
	(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
	(doesn't work since keyboard isn't grabbed) and ButtonPress (does
	work), this is just a fallback for applications that don't update
	this themselves.

	* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field

	* src/screen.c: (meta_screen_apply_startup_properties): Check for
	TIMESTAMP provided from startup sequence as well.

	* src/stack.c:
	s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
	(meta_window_set_stack_position): New function which calls the
	meta_window_set_stack_position_no_sync function followed immediately
	by calling meta_stack_sync_to_server.

	* src/window-props.c:
	(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
	(reload_wm_hints): also load atom_net_wm_user_time

	* src/window.c:
	new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
	(meta_window_new_with_attrs): add timestamp attributes,
	(window_takes_focus_on_map): use TIMESTAMP from startup
	notification and _NET_WM_USER_TIME to decide whether to focus new
	windows,
	(meta_window_show): if app doesn't take focus on map, place it
	just below the focused window in the stack
	(process_property_notify): check for changes to _NET_WM_USRE_TIME,
	(meta_window_stack_just_below): new function

	* src/window.h:
	(_MetaWindow struct): new fields for initial_timestamp,
	initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
	(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
Anders Carlsson
ef1ecc8128 Add a timestamp argument to menu functions and use it in
2004-06-21  Anders Carlsson  <andersca@gnome.org>

	* src/common.h:
	* src/menu.c: (menu_closed), (activate_cb):
	* src/window.c: (menu_callback):
	Add a timestamp argument to menu functions and
	use it in meta_window_delete.
2004-06-21 16:47:27 +00:00
Anders Carlsson
adb26d0543 Get the timestamp from the client message.
2004-06-21  Anders Carlsson  <andersca@gnome.org>

	* src/window.c: (meta_window_client_message):
	Get the timestamp from the client message.
2004-06-21 09:53:23 +00:00
Soeren Sandmann
4cfb5152f7 Fix bug 143333, support for update counter spec, and 109362, schedule
Sat Jun 19 02:21:08 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Fix bug 143333, support for update counter spec, and 109362,
	schedule compensation events when events are ignored.

	* src/display.c (meta_display_open): Add _NET_WM_SYNC_REQUEST and
	_NET_WM_SYNC_REQUEST_COUNTER atoms. Remove the old
	METACITY_SYNC_COUNTER stuff.
	(meta_display_begin_op): Setup the sync counter

	* src/xprops.c, src/xprops.h, src/window-props.c, src/display.h:
	Add new atoms.

	* src/window.c (send_sync_request): new function.
	(meta_window_move_resize_internal): send a sync request before
	resizing.
	(check_move_resize_frequence): Rework logic to also check the SYNC
	case. If an event is ignored return the remaining time.
	(update_resize_timeout): Timeout that gets called when a
	compensation event is scheduled.
	(uddate_resize): schedule compensation events when an event is
	ignored.
	(meta_window_handle_mouse_grap_op_event): When an alarm is
	received and sync was turned off, turn it back on.

	* src/window.h (struct MetaWindow)  Add some variables
2004-06-19 00:45:24 +00:00
Jeff Waugh
9170f58f3b Set titlebar_uses_system_font = false. The previous default was almost
2004-06-04  Jeff Waugh  <jdub@perkypants.org>

	* src/metacity.schemas.in: Set titlebar_uses_system_font = false. The
	previous default was almost violent in its lack of appreciation for
	human beings. In fact, this entire setting should probably be removed, but
	for now, let's just fix the default. Permission granted by Havoc.
2004-06-04 13:55:10 +00:00
Rob Adams
77a1e8ec8b make the no sm support warning dialog resizable, since the default GTK
2004-05-02  Rob Adams  <readams@readams.net>

	* src/metacity-dialog.c (warn_about_no_sm_support): make the no sm
	support warning dialog resizable, since the default GTK warning
	dialog not has default not resizable.  Fix for #141672 from
	Olivier Crete.
2004-05-03 02:03:59 +00:00
Rob Adams
0ceb317ac6 Add a value type check for the visual bell/audible bell gconf settings.
2004-04-29  Rob Adams  <readams@readams.net>

	* src/prefs.c (change_notify): Add a value type check for the
	visual bell/audible bell gconf settings.  Patch from Jarrod
	Johnson for #141409.
2004-04-30 00:26:48 +00:00
Mark McLoughlin
5c01798884 Syncing across this change from libwnck. Patch from Neil Muller
2004-04-19  Mark McLoughlin  <mark@skynet.ie>

        Syncing across this change from libwnck.
        Patch from Neil Muller <neil@dip.sun.ac.za> in bug #133979.

        * src/iconcache.c: (find_largest_sizes), (find_best_size):
        Don't down-size nitems from a gulong to an int. Fixes a
        crash with enlightenment, apparently.
2004-04-19 14:53:14 +00:00
Elijah Newren
4b9a23e8eb Fix unwanted mouse grab op on rapid click-and-release 2004-04-16 03:38:19 +00:00
Rob Adams
f3cc59c78a don't promote due to transiency; we handle that elsewhere now.
2004-03-01  Rob Adams  <readams@readams.net>

	* src/stack.c (compute_layer): don't promote due to transiency; we
	handle that elsewhere now.
	(ensure_above): perform layer promotion here as well as stack
	position promotion.  Note that this means that we need to do stack
	constraints now on layer change now.
	(get_maximum_layer_of_ancestor): remove function
	(max_layer_func): remove function
	(MaxLayerData): remove struct
2004-03-02 02:28:21 +00:00
Rob Adams
56609cbb39 Revert 2/27 patch for layer promotion.
2004-02-28  Rob Adams  <readams@readams.net>

	Revert 2/27 patch for layer promotion.
2004-02-28 23:58:40 +00:00
Rob Adams
16a8add6f8 only move on MRU list if the window belongs on the workspace, since the
2004-02-27  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_notify_focus): only move on MRU list
	if the window belongs on the workspace, since the FocusIn event
	could be for a window whose workspace we've since switched away
	from.  Possible fix for #122016.

	* src/workspace.c (meta_workspace_contains_window): search for the
	workspace in window->workspaces rather than the window in
	workspace->windows.  Since the number of workspaces is at most 36,
	this is a O(1) lookup rather than a O(n) lookup.  Sorry; couldn't
	resist.
2004-02-28 02:53:56 +00:00
Rob Adams
036a61d198 Change move_to_workspace_left/right/up/down keybindings to
2004-02-27  Rob Adams  <readams@readams.net>

	* src/metacity.schemas.in: Change
	move_to_workspace_left/right/up/down keybindings to
	<Control><Alt><Shift> arrow to avoid conflicting with new
	keybindings in spacial nautilus.
2004-02-28 01:56:31 +00:00
Rob Adams
9739346c85 Handle layer promotion of transient descendants of layer-promoted windows
2004-02-27  Rob Adams  <readams@readams.net>

	Handle layer promotion of transient descendants of layer-promoted
	windows to also be layer promoted, using a simple iterative
	algorithm.

	* src/stack.c (compute_layer): change name to promote_layer, and
	convert to simply perform any necessary layer promotion without
	computing the standalone layer.
	(max_layer_func): use window->layer instead of
	get_standalone_layer
	(get_maximum_layer_of_ancestor): use window->layer instead of
	get_standalone_layer
	(meta_stack_ensure_sorted): implement iterative algorithm,
	explained in a long comment.

	* src/window.h: add a tmp_layer field used by stack.c for
	determining if the stack is dirty or not, since maintaining this
	information in meta_stack_ensure_sorted is no longer practical.
2004-02-28 01:49:17 +00:00
Rob Adams
47e6bd5648 Add my copyright notice to a number of files on which it should already
2004-02-23  Rob Adams  <readams@readams.net>

	Add my copyright notice to a number of files on which it should
	already exist.

	* src/window.c (meta_window_notify_focus): modify code to move to
	front of MRU list so that we can have an assert that it was there
	in the first place.  This code may be causing some crashes.  See
	#131196.
2004-02-28 01:48:27 +00:00
Rob Adams
db108c1fc3 Add my copyright notice to a number of files on which it should already
2004-02-23  Rob Adams  <readams@readams.net>

	Add my copyright notice to a number of files on which it should
	already exist.

	* src/window.c (meta_window_notify_focus): modify code to move to
	front of MRU list so that we can have an assert that it was there
	in the first place.  This code may be causing some crashes.  See
	#131196.
2004-02-23 01:48:29 +00:00
Rob Adams
f1701a751f remove trailing comma in MetaKeyBindingAction enum. Fix for #134868 thanks
2004-02-19  Rob Adams  <readams@readams.net>

	* src/prefs.h: remove trailing comma in MetaKeyBindingAction enum.
	Fix for #134868 thanks to bugzilla-gnome@thewrittenword.com.
2004-02-19 18:36:14 +00:00
Rob Adams
ad65847d7d reset drag state after shaking loose or reattaching. Fix for #132625.
2004-02-16  Rob Adams  <readams@readams.net>

	* src/window.c (update_move): reset drag state after shaking loose
	or reattaching.  Fix for #132625.
2004-02-16 19:01:25 +00:00
Anders Carlsson
27eb5a60f3 Actually translate a message, don't just mark it for translation.
2004-02-15  Anders Carlsson  <andersca@gnome.org>

	* src/menu.c (meta_window_menu_new): Actually translate a message,
	don't just mark it for translation.
2004-02-15 14:42:16 +00:00
Elijah Newren
339719568f Prepend windows to mru list when switching workspaces. Fixes #134368 2004-02-15 14:27:43 +00:00
Rob Adams
fd13022dc4 If we're moving a window and receive a _NET_CURRENT_DESKTOP message
2004-02-14  Rob Adams  <readams@readams.net>

	If we're moving a window and receive a _NET_CURRENT_DESKTOP
	message indicating a workspace switch, bring along the drag window
	to the new workspace, solving a potentially weird bug where the
	window would be lost on the old workspace.  This also makes it
	possible to implement edge flipping in an external program with
	just a few lines of code.  Patch for #131630 from ed@catmur.co.uk.

	* src/keybindings.c (switch_to_workspace): remove function -- no
	longer needed.
	(handle_activate_workspace): call meta_workspace_activate instead
	of switch_to_workspace

	* src/workspace.c (meta_workspace_activate_with_focus): if we're
	in a move grab op, bring along the drag window.
2004-02-15 05:29:49 +00:00
James M. Cape
74a8b5b78b Use the 'utility' frame for dialogs too.
2004-01-27  James M. Cape  <jcape@ignore-your.tv>

        * src/themes/Esco/metacity-theme-1.xml: Use the 'utility' frame
        for dialogs too.
2004-01-28 04:20:22 +00:00
James M. Cape
4b3b706369 Updated this theme.
2004-01-24  James M. Cape  <jcape@ignore-your.tv>

	* src/themes/Esco/metacity-theme-1.xml: Updated this theme.
2004-01-24 16:20:41 +00:00
Elijah Newren
595cbe2ac0 Remove duplicate entries. 2004-01-21 17:33:56 +00:00
Rob Adams
007a1f0d0d Default binding removed for toggle_shaded, since we don't have anything in
2004-01-17  Rob Adams  <readams@readams.net>

	* src/metacity.schemas.in: Default binding removed for
	toggle_shaded, since we don't have anything in the graphical UI
	for it any more.
2004-01-17 18:59:42 +00:00
Rob Adams
40a710dad0 Don't show left/right/up/down if a window is sticky. Make "On Top"
2004-01-17  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_show_menu): Don't show
	left/right/up/down if a window is sticky.  Make "On Top"
	insensitive for docks, splash screens, and desktops since it has
	no effect anyway.
2004-01-17 18:57:26 +00:00
Rob Adams
3d996ff73d update default action_double_click_titlebar to be toggle_maximize instead
2004-01-10  Rob Adams  <readams@readams.net>

	* src/metacity.schemas.in: update default
	action_double_click_titlebar to be toggle_maximize instead of
	toggle_shade.  See #131126.
2004-01-10 22:22:46 +00:00
Rob Adams
1b7a651a33 if we maximize after placement, and the window is too big to fix in the
2004-01-12  Rob Adams  <readams@readams.net>

	* src/constraints.c (meta_window_constrain): if we maximize after
	placement, and the window is too big to fix in the work area,
	define a sane saved_rect approximately with dimensions
	three-quarters approximately three quarters the size of the work
	area.  This avoids the problem where large windows would
	unmaximize and actually get bigger.  See #93590.
2004-01-10 18:13:14 +00:00
Thomas Fitzsimmons
a605da04c1 Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
2004-01-09  Thomas Fitzsimmons  <fitzsim@redhat.com>

	Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.

	* src/display.c: include xprops.h
	(process_request_frame_extents): new function
	(meta_display_open): add _NET_FRAME_EXTENTS and
	_NET_REQUEST_FRAME_EXTENTS atoms
	(event_callback): handle frame extents message

	* src/display.h (struct _MetaDisplay): add atom_net_frame_extents
	and atom_net_request_frame_extents

	* src/theme.c (meta_pango_font_desc_get_text_height): make font_desc
	parameter const

	* src/ui.c: include prefs.h
	(meta_ui_theme_get_frame_borders): new function

	* src/window.c (update_net_frame_extents): new function
	(meta_window_move_resize_internal): update frame extents
	property when frame geometry changes

	* src/screen.c (set_supported_hint): add atom_net_frame_extents
	and atom_net_request_frame_extents
2004-01-10 17:16:07 +00:00
Calum Benson
c820769bce Ensure window buttons get larger when using large print themes.
Fixes #123469.
2004-01-09 11:17:28 +00:00
Rob Adams
2fdb75ad45 Maintain the button grab for sloppy and mouse focus all the time. This
2003-01-04  Rob Adams  <readams@readams.net>

	Maintain the button grab for sloppy and mouse focus all the time.
	This fixes a number of problem introduced by trying to drop the
	grab; we now do this only for click to focus mode.  This has the
	unfortunate effect that #102209 reappears for sloppy and mouse
	focus, but this seems unavoidable, because of limitations in the X
	protocol.  See #115072.

	* src/display.c (meta_display_grab_focus_window_button): #if 0 the
	section on not grabbing unless in click-to-focus mode.

	* src/window.c (meta_window_notify_focus): drop focus button grab
	on FocusIn and acquire it on FocusOut only when in click-to-focus
	mode.
2004-01-05 07:24:32 +00:00
Havoc Pennington
a27089a110 handle ReparentNotify, and add a lot of debug output.
2003-12-25  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (process_reparent): handle ReparentNotify, and
	add a lot of debug output.
2003-12-26 02:42:38 +00:00
Havoc Pennington
35c64b45dd change to track all children of the root window, not only mapped children;
2003-12-25  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_process_event): change to
	track all children of the root window, not only mapped children;
	this keeps us from losing track of the stacking order

	* src/display.c (event_callback): don't do any of the compositor
	event handling inline, do it all in compositor.c
2003-12-26 00:05:26 +00:00
Rob Adams
c2ba0a7d67 2003-12-21 Rob Adams <readams@readams.net
* src/main.c (main): fix minor punctuation error in a string.  Fix
	for #129805.
2003-12-22 00:43:53 +00:00
Rob Adams
690100f1ad Reorganize the window menu according to discussion on #110904. The
2003-12-20  Rob Adams  <readams@readams.net>

	Reorganize the window menu according to discussion on #110904.
	The workspace name mnemonic chunk of the patch is thanks to
	Jonathan Blandford.

	* src/common.h: add MENU_OP_ABOVE, MENU_OP_UNABOVE, MENU_UP_MOVE_TO_*
	menu ops.

	* src/core.c (meta_core_get_menu_accelerator): add accelerator for
	the new menu ops.

	* src/menu.c: add checked attribute in _MenuItem struct to display
	a checkmark next to a menu item.  Add the new menu items to
	menuitems.
	(get_workspace_name_with_accel): Add mnemonics even to renamed
	workspaces.
	(menu_item_new): provide support for the checked attribute
	(meta_window_menu_new): construct new submenu for workspace
	switching.

	* src/window.c (menu_callback): implement support for the new menu
	ops.
	(meta_window_show_menu): don't use the OP_*SHAPE operations, and
	compute which of the OP_MOVE_TO_* ops should be used for the
	current workspace and workspace layout.  Add the OP_*ABOVE
	operations.
2003-12-21 06:31:40 +00:00
Rob Adams
4be245a26a add test-size-hints to cvsignore 2003-12-19 23:37:23 +00:00
Rob Adams
104786735a initialize grab_wireframe_active to FALSE. Fix for #128090.
2003-12-17  Rob Adams  <readams@readams.net>

	* src/display.c (meta_display_open): initialize
	grab_wireframe_active to FALSE.  Fix for #128090.

2003-12-17  Rob Adams  <readams@readams.net>

	* src/tabpopup.c (meta_ui_tab_popup_new): Don't try to call
	utf8_strndup on a null title for an entry.  Fix for #128566.

	* src/workspace.c (meta_workspace_free): Call g_list_free on the
	mru_list, since with sticky windows that MRU list could well not
	be emtpy.  See #122016.
2003-12-17 16:01:00 +00:00
Rob Adams
191b3f2c21 set on_all_workspaces in all cases _before_ adding to the workspaces, so
2003-12-13  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_new_with_attrs): set on_all_workspaces
	in all cases _before_ adding to the workspaces, so that windows
	initially on all workspaces are added correctly to the MRU lists.
	Fix for #120907.

	* src/workspace.c (meta_workspace_add_window): handle sticky
	windows so that we add to add mru lists if needed
	(meta_workspace_remove_window): handle sticky windows so that they
	are removed from all mru lists if needed.
2003-12-14 19:19:40 +00:00
Rob Adams
9bde925d3d Revert prior change 2003-12-13 23:00:06 +00:00
Rob Adams
7630d22b8d Add increased robustness for dealing with all workspaces windows and MRU
2003-12-13  Rob Adams  <readams@readams.net>

	Add increased robustness for dealing with all workspaces windows
	and MRU lists.
	Also add very preliminary _NET_WM_USER_TIME
	support, limited to simply listening for the property and keeping
	an internal variable updated, and also treating some input events
	as though they were user time updates.

	* src/window.c (meta_window_new_with_attrs): set on_all_workspaces
	in all cases _before_ adding to the workspaces, so that windows
	initially on all workspaces are added correctly to the MRU lists.
	Fix for #120907.
	(process_property_notify): add net_wm_user_time support.

	* src/workspace.c (meta_workspace_add_window): handle sticky
	windows so that we add to add mru lists if needed
	(meta_workspace_remove_window): handle sticky windows so that they
	are removed from all mru lists if needed.

	* src/display.[ch] (meta_display_open): add net_wm_user_time support.
	(event_callback): simulate user time update on key and button presses.

	* src/screen.c (set_supported_hint): add net_wm_user_time support.

	* src/window-props.c (init_net_wm_user_time): new function for
	user_time support
	(reload_net_wm_user_time): new function for user_time support
	(meta_display_init_window_prop_hooks): add hook for user_time
2003-12-13 18:28:14 +00:00
Havoc Pennington
a92be6e319 unstick window to get it out of mru_list it should not be in; assert that
2003-12-12  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_free): unstick window to get it out of
	mru_list it should not be in; assert that window has been removed
	from all mru_list. Perhaps fixes #122016 crash.
2003-12-13 03:58:55 +00:00
Havoc Pennington
4ebdb0b9c0 fix up compositing manager to somewhat work
2003-11-29  Havoc Pennington  <hp@redhat.com>

	* fix up compositing manager to somewhat work
2003-11-30 03:30:27 +00:00
Havoc Pennington
8d892f76da Oops, did not mean to do that. 2003-11-24 23:05:04 +00:00
Havoc Pennington
03bbe3de17 fix the extension checks
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_new): fix the extension checks
2003-11-24 23:00:52 +00:00
Havoc Pennington
47a1c285c7 init prev_mask field
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* src/iconcache.c (meta_icon_cache_init): init prev_mask field

	* src/window.c (meta_window_new_with_attrs): init xgroup_leader
	prior to use
2003-11-24 19:09:25 +00:00