From 118a1fb76a0b32ddb6346cb8e647fb62900d5790 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sun, 8 Aug 2004 04:11:33 +0000 Subject: [PATCH] activating the current workspace should be a no-op. This prevents a race 2004-08-07 Elijah Newren * 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. --- ChangeLog | 12 +++++++++--- src/display.c | 9 +++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15ef8efc5..f184042f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,15 @@ 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 + * 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. - * window.c (meta_window_activate): If a nonzero timestamp is +2004-08-07 Elijah Newren + + * src/window.c, src/window.h: Revert Rob's 2004-07-31 patch that + ignored net_wm_user_time when unminimizing a window + + * src/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) diff --git a/src/display.c b/src/display.c index 29685106f..86f62bf97 100644 --- a/src/display.c +++ b/src/display.c @@ -2057,8 +2057,13 @@ event_callback (XEvent *event, if (workspace) { - meta_workspace_activate (workspace); - meta_workspace_focus_default_window (workspace, NULL); + if (workspace != screen->active_workspace) + { + meta_workspace_activate (workspace); + meta_workspace_focus_default_window (workspace, NULL); + } + else + meta_verbose ("Workspace %d already active.\n", space); } else meta_verbose ("Don't know about workspace %d\n", space);