From bd73853f72c7a128c5fa750e7adce64b354c036f Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sun, 8 Aug 2004 00:02:02 +0000 Subject: [PATCH] Revert Rob's 2004-07-31 patch that ignored net_wm_user_time when 2004-08-07 Elijah Newren * 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) --- ChangeLog | 9 +++++++++ src/window.c | 11 +++-------- src/window.h | 1 - 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fad6db50..15ef8efc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-08-07 Elijah Newren + + * 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 Remove some extraneous items that could sometimes appear in the diff --git a/src/window.c b/src/window.c index ae22da9ec..87ed674e5 100644 --- a/src/window.c +++ b/src/window.c @@ -459,7 +459,6 @@ meta_window_new_with_attrs (MetaDisplay *display, window->initial_workspace_set = FALSE; window->initial_timestamp_set = FALSE; window->net_wm_user_time_set = FALSE; - window->focus_despite_user_time = FALSE; window->calc_placement = FALSE; window->shaken_loose = 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_DIALOG: case META_WINDOW_MODAL_DIALOG: - if (window->focus_despite_user_time) - return TRUE; - meta_topic (META_DEBUG_STARTUP, "COMPARISON:\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); } - window->focus_despite_user_time = FALSE; - if (!window->placed) { /* We have to recalc the placement here since other windows may @@ -1939,8 +1933,6 @@ meta_window_unminimize (MetaWindow *window) if (window->minimized) { window->minimized = FALSE; - window->focus_despite_user_time = TRUE; - meta_window_queue_calc_showing (window); meta_window_foreach_transient (window, @@ -2200,6 +2192,9 @@ void meta_window_activate (MetaWindow *window, guint32 timestamp) { + if (timestamp != 0) + window->net_wm_user_time = timestamp; + /* disable show desktop mode unless we're a desktop component */ maybe_leave_show_desktop_mode (window); diff --git a/src/window.h b/src/window.h index 0c7a0d51a..183c58f16 100644 --- a/src/window.h +++ b/src/window.h @@ -147,7 +147,6 @@ struct _MetaWindow /* whether net_wm_user_time has been set yet */ guint net_wm_user_time_set : 1; - guint focus_despite_user_time : 1; /* These are the flags from WM_PROTOCOLS */ guint take_focus : 1;