Commit Graph

883 Commits

Author SHA1 Message Date
Elijah Newren
2a5689911f Don't lower newly mapped windows when they're denied focus, if they are
2004-10-25  Elijah Newren  <newren@math.utah.edu>

	Don't lower newly mapped windows when they're denied focus, if
	they are transients of the focused window.  Instead, defocus the
	currently focused window.  (fixes #151996).

	(Also, reenable focus stealing prevention and do a small spacing
	cleanup)

	* src/window-props.c (init_net_startup_id): fix spacing

	* src/window.c (window_takes_focus_on_map): re-enable focus
	stealing prevention, (meta_window_show): if the new window is
	denied focus and is a transient of the currently focused window,
	defocus the currently focused window but keep the transient on
	top; remove some old code about transients and focus; make sure
	that EnterNotify events won't accidentally focus the new window.
2004-10-25 16:28:57 +00:00
Elijah Newren
8b26849517 Fix the alt-tab order--if the most recently used window is not focused,
2004-10-25  Elijah Newren  <newren@math.utah.edu>

	Fix the alt-tab order--if the most recently used window is not
	focused, start alt tabbing with that window instead of the one
	after it (fixes #156251)

	* src/display.c (find_tab_forward): add a skip_first parameter,
	(find_tab_backward): add a skip_last parameter,
	(meta_display_get_tab_next): if a beginning window wasn't given
	and the focused window isn't the tab chain, don't skip the MRU
	window
2004-10-25 16:17:19 +00:00
Elijah Newren
6d77251c71 Update _NET_WM_STATE_HIDDEN so the pager on the panel will know whether to
2004-10-22  Elijah Newren  <newren@math.utah.edu>

	Update _NET_WM_STATE_HIDDEN so the pager on the panel will know
	whether to display windows as visible or hidden (#105665)

	* src/screen.c (queue_windows_showing): Revert the
	queue_windows_showing portion of the patch committed on 2004-10-16
	for #142198--it was an ill-advised optimization.

	* src/window.c (window_showing_on_its_workspace,
	window_should_be_showing): split the old window_should_be_showing
	into these two functions, (set_net_wm_state): hidden state is more
	complex; use window_showing_on_its_workspace to determine the
	correct value
2004-10-22 20:28:36 +00:00
Elijah Newren
ccd4414a0f Patch from Soeren to fix the modifier key breakage introduced by an Xorg
2004-10-20  Elijah Newren  <newren@math.utah.edu>

	Patch from Soeren to fix the modifier key breakage introduced by
	an Xorg change. (fixes #151554)

	* src/keybindings.c: include X11/XKBlib.h if available,
	(handle_spew_mark): remove this unused function declaration,
	(end_keyboard_grab): new function, uses XKB if available,
	(process_tab_grab): use end_keyboard_grab to determine whether to
	end the grab, (error_on_command): make key a const char *,
	(process_workspace_switch_grab): use end_keyboard_grab to
	determine whether to end the grab
2004-10-20 23:16:08 +00:00
Anders Carlsson
c397af4896 Don't try to use an ARGB visual at all if the depth isn't 32-bit. This
2004-10-19  Anders Carlsson  <andersca@gnome.org>

	* src/frame.c: (meta_window_ensure_frame):
	Don't try to use an ARGB visual at all if the depth isn't
	32-bit. This caused major slowdowns with Composite enabled.
2004-10-19 05:18:11 +00:00
Elijah Newren
e84778d1eb Make the "showing desktop" mode be per-workspace instead of per-screen.
2004-10-16  Elijah Newren  <newren@math.utah.edu>

	Make the "showing desktop" mode be per-workspace instead of
	per-screen. (fixes #142198)

	* src/keybindings.c (handle_toggle_desktop): access
	showing_desktop through the active workspace

	* src/screen.c (meta_screen_new): remove initialization of
	screen->showing_desktop,
	(meta_screen_update_showing_desktop_hint): rename and make not
	static and access showing_desktop through the active workspace,
	(queue_windows_showing): replace meta_display_list_windows() with
	screen->active_workspace->windows,
	(meta_screen_minimize_all_on_active_workspace_except): renamed
	from meta_screen_minimize_all_except since it now only works on
	the active workspace, (meta_screen_show_desktop,
	meta_screen_unshow_desktop): access showing_desktop through the
	active workspace

	* src/screen.h (struct _MetaScreen): remove showing_desktop field,
	(meta_screen_minimize_all_on_active_workspace_except): rename from
	meta_screen_minimize_all_except,
	(meta_screen_update)_showing_desktop_hint): export this function too

	* src/window.c (maybe_leave_show_desktop_mode): access
	showing_desktop through the active workspace and use new name for
	meta_screen_minimize_all_on_active_workspace_except,
	(window_should_be_showing): access showing_desktop through the
	active workspace

	* src/workspace.c (meta_workspace_new): initialize
	workspace->showing_desktop, (meta_workspace_activate_with_focus):
	add note that old can be NULL, update showing_desktop_hint if
	different on this workspace than the previous one

	* src/workspace.h (struct _MetaWorkspace): add showing_desktop
	field
2004-10-17 04:28:29 +00:00
Elijah Newren
3c974b87b4 Fix from Rob to correct requested number of keycodes (#155247)
2004-10-15  Elijah Newren  <newren@math.utah.edu>

	* src/keybindings.c (reload_keymap): Fix from Rob to correct
	requested number of keycodes (#155247)
2004-10-15 22:43:52 +00:00
Elijah Newren
05388194fc Code cleanup
2004-10-13  Elijah Newren  <newren@math.utah.edu>

	Code cleanup

	* src/window.c (is_in_dock_group, docks_at_end_cmp,
	shuffle_docks_to_end): removed functions,
	(meta_window_notify_focus): no need to call is_in_dock_group or
	shuffle_docks_to_end because of the patch from #120100 that was
	committed.
2004-10-13 18:54:46 +00:00
Vincent Untz
b03558dc4d Add a keybinding to launch a terminal
2004-10-13  Vincent Untz  <vincent@vuntz.net>

	Add a keybinding to launch a terminal

	* src/keybindings.c: (handle_run_terminal): new function,
	(error_on_generic_command): new function, (error_on_command): wrapper
	around error_on_generic_command(), (error_on_terminal_command): new
	function

	* src/metacity.schemas.in: add run_command_terminal key

	* src/prefs.[ch]: (meta_prefs_init): cache the terminal command and
	register a gconf callback to update it, (change_notify): handle the
	notification of terminal command changes, (meta_preference_to_string):
	add the terminal command case, (update_terminal_command): new function,
	(meta_prefs_get_terminal_command): new function,
	(meta_prefs_get_gconf_key_for_terminal_command): new function
2004-10-13 08:32:10 +00:00
Elijah Newren
81fe64991c Fix middle-frame-click-to-lower focus inconsistency (#154601)
2004-10-08  Elijah Newren  <newren@math.utah.edu>

	Fix middle-frame-click-to-lower focus inconsistency (#154601)

	* src/core.c (meta_core_user_lower_and_unfocus): focus the default
	window in all focus modes, not just click-to-focus (EnterNotify
	events will not handle this case for sloppy and mouse focus)

	* src/display.c (event_callback): replace window->has_focus with
	window == display->expected_focus_window to avoid a race issue
2004-10-08 22:34:34 +00:00
Elijah Newren
79b4de04fc Alter the meaning of expected_focus_window; doesn't affect current
2004-10-08  Elijah Newren  <newren@math.utah.edu>

         Alter the meaning of expected_focus_window; doesn't affect
	 current operation but assists in fixing some other bugs
	 (#154598)

	* src/display.c (meta_display_focus_the_no_focus_window): set the
	expected_focus_window to NULL.

	* src/window.c (meta_window_notify_focus): don't NULL the
	expected_focus_window when that window receives a FocusIn event
2004-10-08 21:57:01 +00:00
Elijah Newren
714fb3d539 if the root window gets focused, set the focus to the default window; this
2004-10-04  Elijah Newren  <newren@math.utah.edu>

	* src/display.c (event_callback): if the root window gets focused,
	set the focus to the default window; this fixes the
	"focus-follows-mouse" behavior seen for click-to-focus mode after
	cancelling log out (fixes #153220)
2004-10-04 21:21:38 +00:00
Elijah Newren
70e40c235c Fix a variety of issues with autoraise (#134206)
2004-10-04  Elijah Newren  <newren@math.utah.edu>

	Fix a variety of issues with autoraise (#134206)

	* src/display.h: (struct _MetaDisplay): add an autoraise_window
	parameter

	* src/display.[hc] (meta_display_focus_the_no_focus_window): new
	function, (meta_display_queue_autoraise_callback): new function,
	(meta_display_remove_autoraise_callback): new function

	* src/display.c (meta_display_open): intialize
	display->autoraise_window too, (meta_display_close): remove any
	pending autoraise callback, (window_raise_with_delay_callback):
	clear out auto_raise->display->autoraise_window too,
	(event_callback): call meta_display_queue_autoraise_callback
	instead of having the code inline, call
	meta_display_focus_the_no_focus_window to handle focusing that
	window

	* src/window.c (meta_window_focus): If there's a window with an
	autoraise timeout that isn't the window being focused, remove the
	autoraise timeout

	* src/workspace.c (meta_workspace_focus_default_window): If no
	autoraise timeout is queued for the given window then queue one
	now, call meta_display_focus_the_no_focus_window to handle
	focusing that window, (meta_workspace_focus_mru_window): call
	meta_display_focus_the_no_focus_window to handle focusing that
	window
2004-10-04 21:09:08 +00:00
Elijah Newren
e8877141b7 Ooops, forgot to update the patch to account for change in bug 152000 2004-10-04 20:43:55 +00:00
Elijah Newren
546fe7b5b3 When no window becomes focused, focus the default window instead of
2004-10-04  Elijah Newren  <newren@math.utah.edu>

	* src/display.c (event_callback): When no window becomes focused,
	focus the default window instead of punting to the
	no_focus_window.  Also, change the warning to a verbose
	message--this will happen frequently due to brain-damage in the X
	protocol.  (see #125492)
2004-10-04 20:39:21 +00:00
Elijah Newren
16b9aff47c Fix a variety of focus race conditions in all focus modes, or at least
2004-10-04  Elijah Newren  <newren@math.utah.edu>

	Fix a variety of focus race conditions in all focus modes, or at
	least make them harder to trigger (fixes #152000)

	* src/core.[ch] (meta_core_user_lower_and_unfocus): add a
	timestamp parameter; pass it along to
	meta_workspace_focus_default_window

	* src/display.[ch] (meta_display_get_current_time_roundtrip): new
	function

	* src/display.c (event_callback): pass a timestamp to the
	meta_workspace_activate and meta_workspace_focus_default_window
	function calls

	* src/frames.c (meta_frames_button_press_event): pass a timestamp
	to meta_core_user_lower_and_unfocus

	* src/keybindings.c (handle_activate_workspace): pass a timestamp
	to meta_workspace_activate, (process_workspace_switch_grab): pass
	a timestamp to meta_workspace_focus_default_window and
	meta_workspace_activate, (handle_toggle_desktop): pass a timestamp
	to meta_workspace_focus_default_window,
	(do_handle_move_to_workspace): pass a timestamp to
	meta_workspace_activate_with_focus, (handle_workspace_switch):
	meta_workspace_activate

	* src/screen.c (meta_screen_new): pass a timestamp to
	meta_workspace_activate

	* src/window.c (meta_window_free): pass a timestamp to
	meta_workspace_focus_default_window, (idle_calc_showing): don't
	increment the focus sentinel here, (meta_window_minimize): pass a
	timestamp to meta_workspace_focus_default_window,
	(meta_window_client_message), pass a timestamp to
	meta_workspace_focus_default_window

	* src/workspace.h (meta_workspace_activate): add timestamp
	parameter, (meta_workspace_activate_with_focus): add timestamp
	parameter, (meta_workspace_focus_default_window): add timestamp
	parameter

	* src/workspace.c (meta_workspace_focus_mru_window): make this
	function take a timestamp and use it for meta_window_focus or
	XSetInputFocus, (meta_workspace_activate_with_focus): make this
	function take a timestamp and pass it along to meta_window_focus
	and meta_workspace_focus_default_window,
	(meta_workspace_activate): make this function take a timestamp and
	pass it to meta_workspace_activate_with_focus),
	(meta_workspace_focus_default_window): make this function take a
	timestamp, warn if its 0 but try to handle that case sanely, and
	pass the timestamp on to meta_window_focus or
	meta_workspace_focus_mru_window or XSetInputFocus
2004-10-04 20:32:59 +00:00
Elijah Newren
7b1e571919 Focus the default window after the user dismisses the workspace switcher
2004-09-22  Elijah Newren  <newren@math.utah.edu>

	* src/keybindings.c (process_workspace_switch_grab): Focus the
	default window after the user dismisses the workspace switcher
	popup (fixes #123803; note that an alternate fix was made
	independently by David Baron for sloppy and mouse focus users)
2004-09-22 19:15:26 +00:00
Elijah Newren
3b9ec3ce50 Fix some uninitialized variable errors reported by valgrind (see #153338)
2004-09-22  Elijah Newren  <newren@math.utah.edu>

	Fix some uninitialized variable errors reported by valgrind (see
	#153338)

	* src/display.c (meta_display_open): initialize
	display->grab_resize_timeout_id, and display->grab_have_keyboard

	* src/ui.c (meta_ui_create_frame_window): initialize attrs.width
	and attrs.height
2004-09-22 18:57:36 +00:00
Elijah Newren
7ee43e5a36 Don't focus a window that is minimized (fixes #147947)
2004-09-17  Elijah Newren  <newren@math.utah.edu>

	* src/workspace.c (meta_workspace_focus_mru_window): Don't focus a
	window that is minimized (fixes #147947)
2004-09-17 19:49:32 +00:00
Kjartan Maraas
43cc3b8606 A load of fixes of issues reported by sparse. Closes bug #152849
2004-09-17  Kjartan Maraas  <kmaraas@gnome.org>

	* src/bell.c: (meta_bell_flash_screen):
	* src/compositor.c:
	* src/effects.c: (meta_effects_draw_box_animation):
	* src/fixedtip.c: (meta_fixed_tip_show):
	* src/frame.c: (find_argb_visual):
	* src/frames.c: (unsigned_long_hash), (meta_frames_manage_window),
	(meta_frames_apply_shapes):
	* src/iconcache.c: (find_largest_sizes), (find_best_size):
	* src/keybindings.c: (meta_spawn_command_line_async_on_screen):
	* src/main.c: (main):
	* src/menu.c: (meta_window_menu_new):
	* src/prefs.c: (meta_prefs_get_visual_bell),
	(meta_prefs_bell_is_audible), (meta_prefs_get_visual_bell_type),
	(meta_prefs_get_action_double_click_titlebar),
	(meta_prefs_get_auto_raise), (meta_prefs_get_auto_raise_delay),
	(meta_prefs_get_reduced_resources):
	* src/screen.c: (meta_create_offscreen_window):
	* src/tabpopup.c: (meta_ui_tab_popup_get_selected):
	* src/theme-parser.c: (meta_theme_load):
	* src/theme.c: (meta_gtk_widget_get_font_desc):
	* src/tools/metacity-mag.c: (mouse_press), (begin_area_grab):
	* src/util.c: (meta_unsigned_long_hash): A load of fixes of issues
	reported by sparse. Closes bug #152849
2004-09-16 23:18:22 +00:00
Elijah Newren
9d9c744490 Remove some redundant code regarding focusing the default window (#152117)
2004-09-15  Elijah Newren  <newren@math.utah.edu>

	* src/display.c (event_callback): Remove some redundant code
	regarding focusing the default window (#152117)
2004-09-16 03:10:11 +00:00
Elijah Newren
63e1624bd7 Patch from Ken Harris in #135786 to focus a new default window when
2004-09-15  Elijah Newren  <newren@math.utah.edu>

	Patch from Ken Harris in #135786 to focus a new default window
	when lowering via middle-click on the frame.

	* src/core.[hc], src/frames.c: rename meta_core_user_lower to
	meta_core_user_lower_and_unfocus

	* src/core.c (meta_core_user_lower_and_unfocus): if in
	click-to-focus mode then also move the window to the back of the
	mru list and focus the new default window for the active workspace
2004-09-16 00:06:38 +00:00
Elijah Newren
cffe7e9566 Focus the no_focus_window if no suitable window is in the mru list (should
2004-09-15  Elijah Newren  <newren@math.utah.edu>

	Focus the no_focus_window if no suitable window is in the mru list
	(should fix the almost contrived extra issue found in #147475)

	* doc/how-to-get-focus-right.txt: We no longer need to lie about
	only focusing panels upon explicit request.

	* src/workspace.c: (meta_workspace_focus_top_window): removed this
	function--it was more code than needed and was unreliable anyway,
	(meta_workspace_focus_mru_window): if a suitable window isn't in
	the mru list, focus the no_focus_window instead of calling
	focus_top_window.
2004-09-15 16:53:20 +00:00
Elijah Newren
101a097f02 Prevent focus inconsistencies by only providing one focus method (fixes
2004-09-15  Elijah Newren  <newren@math.utah.edu>

	Prevent focus inconsistencies by only providing one focus method
	(fixes #151990)

	* src/screen.c (meta_screen_show_desktop): remove call to
	meta_workspace_focus_top_window (it was merely focusing a window
	that was going to be hidden anyway, and likely the one that
	already had focus)

	* src/workspace.[hc]: remove meta_workspace_focus_mru_window and
	meta_workspace_focus_top_window from workspace.h, make them static
	functions in workspace.c
2004-09-15 16:42:52 +00:00
Elijah Newren
5ac6fcad73 Remove race condition for focus window choice on window close followed by
2004-09-15  Elijah Newren  <newren@math.utah.edu>

	Remove race condition for focus window choice on window close
	followed by rapid mouse movement in sloppy and mouse focus modes
	(fixes #152000)

	* src/window.c (meta_window_free): Don't increment the focus
	sentinel for windows being freed, (idle_calc_showing): don't
	increment the focus sentinel for windows being minimized
2004-09-15 15:54:51 +00:00
Elijah Newren
a880f5d401 Fix unwanted loss of focus to the mouse window when using keynav (fixes
2004-09-15  Elijah Newren  <newren@math.utah.edu>

	Fix unwanted loss of focus to the mouse window when using keynav
	(fixes #101190)

	* src/display.c (event_callback): Ignore EnterNotify events with
	xcrossing.mode of either NotifyGrab or NotifyUngrab
2004-09-15 15:46:25 +00:00
Elijah Newren
4b9fe2cae7 Focus correct window after minimizing via the tasklist (fixes #128200; see
2004-09-15  Elijah Newren  <newren@math.utah.edu>

	Focus correct window after minimizing via the tasklist (fixes
	#128200; see also #107681)

	* src/display.h (struct _MetaDisplay): track the
	previously_focused_window

	* src/display.c (meta_display_open): initialize
	previously_focused_window

	* src/window.c (meta_window_free): clear the
	previously_focused_window if it's being freed,
	(meta_window_client_message): if we get a request to minimize the
	previously_focused_window and the focus_window is a dock or the
	desktop, focus the default window, (meta_window_notify_focus):
	update the previously_focused_window
2004-09-15 15:38:09 +00:00
Elijah Newren
8c7f81eac9 Disable focus-stealing-prevention for now; there are still some issues and
2004-08-29  Elijah Newren  <newren@math.utah.edu>

	* src/window.c (window_takes_focus_on_map): Disable
	focus-stealing-prevention for now; there are still some issues and
	hard code freeze is tomorrow...so this will have to wait until
	Gnome 2.10.
2004-08-30 04:56:07 +00:00
Havoc Pennington
19b808c4f5 add comment about broken assertion 2004-08-27 22:19:43 +00:00
Havoc Pennington
744efc95a1 disable NameWindowPixmap stuff always for now, it seemed kind of busted
2004-08-27  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_new): disable NameWindowPixmap
	stuff always for now, it seemed kind of busted
	(paint_screen): don't grab the server during repaint, adds to the
	speed, though only slightly.

	* src/frames.c (meta_frames_set_window_background): factor out all
	the set_background stuff to one function; disable setting
	background to transparent, because it breaks existing themes. We
	need to add a flag in the theme XML file to say "start me with a
	transparent background"
2004-08-27 22:09:13 +00:00
Elijah Newren
522e9916b6 Prevent an assertion failure that can occur after increasing the number of
2004-08-27  Elijah Newren  <newren@math.utah.edu>

	Prevent an assertion failure that can occur after increasing the
	number of workspaces; also fix a warning and stacking order when a
	window is denied focus (fixes #150615)

	* src/window.c (meta_window_stack_just_below): the position of the
	window should be set equal to that of the one we want to be below,
	not 1 lower than that number

	* src/workspace.c (maybe_add_to_list): new function to add
	on_all_workspace windows to an mru_list, (meta_workspace_new):
	call maybe_add_to_list for all windows on the screen in order to
	initialize the mru_list
2004-08-27 17:22:54 +00:00
Havoc Pennington
b682a9f945 delete extra copy of find_argb_visual so things compile
2004-08-26  Havoc Pennington  <hp@redhat.com>

	* src/frame.c: delete extra copy of find_argb_visual so things
	compile

	* src/compositor.c (HAS_NAME_WINDOW_PIXMAP): copy the
	XCompositeNameWindowPixmap() stuff from xcompmgr, though I can't
	say I really know what it's supposed to help with (painting the
	window border?)
2004-08-27 03:27:43 +00:00
Havoc Pennington
a8fd516aa0 couple of cosmetic tweaks from resolving my local patch with the bugzilla
2004-08-26  Havoc Pennington  <hp@redhat.com>

	* src/frame.c, src/theme.c: couple of cosmetic tweaks from
	resolving my local patch with the bugzilla patch from the 8-19
	entry below
2004-08-27 02:24:48 +00:00
Havoc Pennington
1f7f29e059 move the have_xrender variable initialization up in the file since it can
2004-08-26  Havoc Pennington  <hp@redhat.com>

	* configure.in: move the have_xrender variable initialization up
	in the file since it can be set as part of composite check

2004-08-19  Havoc Pennington  <hp@redhat.com>

	Fixes from Rich Wareham

	* src/display.h (struct _MetaDisplay): add render extension check
	to the display

	* src/display.c: check for render

	* configure.in: don't build compositing manager by default, don't
	want any nasty surprises; check for render separately from
	compositing manager

	* src/frame.c: use an ARGB visual when available for the window
	frame, so we can be all cool-ass
2004-08-27 02:17:49 +00:00
Elijah Newren
044d8999a3 Make dialogs that Metacity shows follow focus-stealing-prevention
2004-08-25  Elijah Newren  <newren@math.utah.edu>

	Make dialogs that Metacity shows follow focus-stealing-prevention
	conventions. (fixes one issue in #149028; see comments 47-54)

	* src/delete.c (delete_ping_reply_func,
	delete_ping_timeout_func): Make callback functions take a
	timestamp arg, (delete_ping_timeout_func): pass the timestamp to
	metacity-dialog

	* src/display.c (meta_display_ping_timeout): add a timestamp to
	the call to the ping_timeout_func, (meta_display_ping_window,
	process_pong_message): add a timestamp to the call to the
	ping_reply_func

	* src/display.h (MetaWindowPingFunc typedef): add a timestamp to
	this function typedef

	* src/keybindings.c (error_on_command): require a timestamp and
	pass the timestamp on to metacity-dialog, (handle_run_command):
	pass a timestamp to error_on_command

	* src/metacity-dialog.c (copy_of_gdk_x11_window_set_user_time):
	new function (temporary; only for use while using gtk+-2.4),
	(kill_window_question, warn_about_no_sm_support,
	error_about_command): make these functions take a timestamp and
	call copy_of_gdk_x11_window_set_user_time, (main): require the
	first two args to the program to be "--timestamp <timestamp>"

	* src/session.c (warn_about_lame_clients_and_finish_inter): pass a
	timestamp of 0 to metacity-dialog to prevent focus (it's a popup
	not generated by and kind of user request).
2004-08-26 00:59:12 +00:00
Soeren Sandmann
9cee95f210 Move wireframe code before grab is released to prevent endless loops with
Fri Aug 20 12:54:12 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/display.c (meta_display_end_grab_op): Move wireframe code
	before grab is released to prevent endless loops with fullscreen
	windows.
2004-08-20 10:56:41 +00:00
Havoc Pennington
06a58f43c0 track the last_xor_rect separately from the current window size, and then
2004-08-18  Havoc Pennington  <hp@redhat.com>

	* src/display.h (struct _MetaDisplay): track the last_xor_rect
	separately from the current window size, and then use that to
	paint the wireframe including the frame, and taking into
	account shaded windows.

	* src/window.c (meta_window_get_xor_rect): new function to compute
	the xor rect; it is not really 100% right, because it uses the
	frame dimensions from the window at the start of the move/resize.
	But probably won't break in practice.
2004-08-19 02:05:24 +00:00
Rob Adams
afee4a4251 use height and top/bottom struts to compute gap (copy/paste bug).
2004-08-15  Rob Adams  <readams@readams.net>

	* src/windows.c (meta_window_update_struts): use height and
	top/bottom struts to compute gap (copy/paste bug).
2004-08-15 17:32:45 +00:00
Rob Adams
caaad4449c Allow struts larger than 1/2 the screen width/height, as long as there's a
2004-08-15  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_update_struts): Allow struts larger
	than 1/2 the screen width/height, as long as there's a minimum
	sized gap between them.  Patch from Bill Haneman <billh@gnome.org>
	for bug #144126.
2004-08-15 15:26:30 +00:00
Soeren Sandmann
766d46b70d New function. Use it here to synchronize with the hardware between each
Mon Aug  9 05:38:33 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/effects.c (graphics_sync): New function.
	* src/effects.c (effects_draw_box_animation_timeout): Use it here
	to synchronize with the hardware between each frame.
2004-08-09 03:40:37 +00:00
Rob Adams
5f1de4bf7a Add #ifdef around XSYNC code; fixes compile problem if XSYNC is disabled.
2004-08-08  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_move_resize_internal): Add #ifdef
	around XSYNC code; fixes compile problem if XSYNC is disabled.
	Path for #149314 from Peter O'Shea and independently Mike Castle.
2004-08-08 16:18:52 +00:00
Soeren Sandmann
2e0bb772ea Flush after setting cursor. (Rest of #149413).
Sun Aug  8 14:20:00 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/frame.c (meta_frame_set_screen_cursor): Flush after setting
	cursor. (Rest of #149413).
2004-08-08 12:23:34 +00:00
Elijah Newren
118a1fb76a activating the current workspace should be a no-op. This prevents a race
2004-08-07  Elijah Newren  <newren@math.utah.edu>

	* src/display.c (event_callback): activating the current workspace
	should be a no-op.  This prevents a race condition in focus window
	choice when activating a window via the taskbar.  Fix for #149589.
2004-08-08 04:11:33 +00:00
Elijah Newren
bd73853f72 Revert Rob's 2004-07-31 patch that ignored net_wm_user_time when
2004-08-07  Elijah Newren  <newren@math.utah.edu>

	* window.c, window.h: Revert Rob's 2004-07-31 patch that ignored
	net_wm_user_time when unminimizing a window

	* window.c (meta_window_activate): If a nonzero timestamp is
	passed, update the window's net_wm_user_time accordingly.  (see
	comments 102-108 of bug 118372)
2004-08-08 00:02:02 +00:00
Rob Adams
de4c7a0610 Remove some extraneous items that could sometimes appear in the window
2004-08-07  Rob Adams  <readams@readams.net>

	Remove some extraneous items that could sometimes appear in the
	window menu.  Fix for #144493.

	* src/menu.c (menuitems): Change the second separator to key on
	whether there are any workspaces.
	(meta_window_menu_new): use NULL label instead of 0 op to identify
	separator

	* src/window.c (meta_window_show_menu): Change the conditions on
	the directions to take into account "holes" in the workspace
	layout and also only set META_MENU_OP_WORKSPACES when there's more
	than one workspace.
2004-08-07 17:50:40 +00:00
Havoc Pennington
7bcc485701 add XFlush() after setting cursor, #149413
2004-08-07  Havoc Pennington  <hp@redhat.com>

	* src/screen.c (meta_screen_set_cursor): add XFlush() after
	setting cursor, #149413
2004-08-07 16:33:11 +00:00
Elijah Newren
e81659d2ff Focusing a window upon unshowing the desktop in various ways (panel applet
2004-08-06  Elijah Newren  <newren@math.utah.edu>

	* src/display.c (event_callback): Focusing a window upon unshowing
	the desktop in various ways (panel applet or keybinding) was
	inconsistent for sloppy and click focus modes.  Fix this by
	calling meta_workspace_focus_default_window after unshowing the
	desktop via a _NET_SHOWING_DESKTOP message.  (resolves #149543)
2004-08-07 03:13:56 +00:00
Elijah Newren
385248044d prevent keyboard from "getting locked" upon workspace switch, by making
2004-08-06  Elijah Newren  <newren@math.utah.edu>

	* src/workspace.c (meta_workspace_focus_default_window): prevent
	keyboard from "getting locked" upon workspace switch, by making
	sure that the no_focus_window has focus if no other window does.
	(fixes #147475)
2004-08-06 18:13:55 +00:00
Elijah Newren
abe183c14c Have newly mapped windows that are denied focus appear after the focused
2004-08-05  Elijah Newren  <newren@math.utah.edu>

	Have newly mapped windows that are denied focus appear after the
	focused window in the alt-tab list.  This allows one to switch to
	such a window with a single alt-tab press.

	* src/window.c (ensure_mru_position_after): new function,
	(meta_window_show): If newly mapped window is denied focus, call
	ensure_mru_position_after to make the window appear after the
	focus window in the mru list.
2004-08-05 17:48:39 +00:00
Elijah Newren
b834001fe7 prepend window to mru list instead of appending, since making the window
2004-08-05  Elijah Newren  <newren@math.utah.edu>

	* src/window.c (meta_window_stick): prepend window to mru list
	instead of appending, since making the window sticky should imply
	that it is the most recently used, not the least recently.  (fixes
	#149369)
2004-08-05 16:23:37 +00:00