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)
This commit is contained in:
Elijah Newren 2004-08-08 00:02:02 +00:00 committed by Elijah Newren
parent de4c7a0610
commit bd73853f72
3 changed files with 12 additions and 9 deletions

View File

@ -1,3 +1,12 @@
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-07 Rob Adams <readams@readams.net> 2004-08-07 Rob Adams <readams@readams.net>
Remove some extraneous items that could sometimes appear in the Remove some extraneous items that could sometimes appear in the

View File

@ -459,7 +459,6 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->initial_workspace_set = FALSE; window->initial_workspace_set = FALSE;
window->initial_timestamp_set = FALSE; window->initial_timestamp_set = FALSE;
window->net_wm_user_time_set = FALSE; window->net_wm_user_time_set = FALSE;
window->focus_despite_user_time = FALSE;
window->calc_placement = FALSE; window->calc_placement = FALSE;
window->shaken_loose = FALSE; window->shaken_loose = FALSE;
window->have_focus_click_grab = FALSE; window->have_focus_click_grab = FALSE;
@ -1622,9 +1621,6 @@ window_takes_focus_on_map (MetaWindow *window)
case META_WINDOW_NORMAL: case META_WINDOW_NORMAL:
case META_WINDOW_DIALOG: case META_WINDOW_DIALOG:
case META_WINDOW_MODAL_DIALOG: case META_WINDOW_MODAL_DIALOG:
if (window->focus_despite_user_time)
return TRUE;
meta_topic (META_DEBUG_STARTUP, meta_topic (META_DEBUG_STARTUP,
"COMPARISON:\n" "COMPARISON:\n"
" net_wm_user_time_set : %d\n" " net_wm_user_time_set : %d\n"
@ -1723,8 +1719,6 @@ meta_window_show (MetaWindow *window)
ensure_mru_position_after (window, window->display->focus_window); ensure_mru_position_after (window, window->display->focus_window);
} }
window->focus_despite_user_time = FALSE;
if (!window->placed) if (!window->placed)
{ {
/* We have to recalc the placement here since other windows may /* We have to recalc the placement here since other windows may
@ -1939,8 +1933,6 @@ meta_window_unminimize (MetaWindow *window)
if (window->minimized) if (window->minimized)
{ {
window->minimized = FALSE; window->minimized = FALSE;
window->focus_despite_user_time = TRUE;
meta_window_queue_calc_showing (window); meta_window_queue_calc_showing (window);
meta_window_foreach_transient (window, meta_window_foreach_transient (window,
@ -2200,6 +2192,9 @@ void
meta_window_activate (MetaWindow *window, meta_window_activate (MetaWindow *window,
guint32 timestamp) guint32 timestamp)
{ {
if (timestamp != 0)
window->net_wm_user_time = timestamp;
/* disable show desktop mode unless we're a desktop component */ /* disable show desktop mode unless we're a desktop component */
maybe_leave_show_desktop_mode (window); maybe_leave_show_desktop_mode (window);

View File

@ -147,7 +147,6 @@ struct _MetaWindow
/* whether net_wm_user_time has been set yet */ /* whether net_wm_user_time has been set yet */
guint net_wm_user_time_set : 1; guint net_wm_user_time_set : 1;
guint focus_despite_user_time : 1;
/* These are the flags from WM_PROTOCOLS */ /* These are the flags from WM_PROTOCOLS */
guint take_focus : 1; guint take_focus : 1;