diff options
author | Elijah Newren <newren@math.utah.edu> | 2004-10-08 22:34:34 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2004-10-08 22:34:34 +0000 |
commit | 81fe64991c2fca7b794d6b9b70e5eea85a75d08e (patch) | |
tree | 39f3e6efbe4f7eb40f693b4b58b16117ed3e26a4 | |
parent | 79b4de04fc9e99d5df79c1e5be42c3fea649264c (diff) | |
download | mutter-81fe64991c2fca7b794d6b9b70e5eea85a75d08e.tar.gz |
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
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | src/core.c | 12 | ||||
-rw-r--r-- | src/display.c | 2 |
3 files changed, 21 insertions, 10 deletions
@@ -1,8 +1,19 @@ 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) + 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 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. diff --git a/src/core.c b/src/core.c index 437a00972..6471969b3 100644 --- a/src/core.c +++ b/src/core.c @@ -275,13 +275,13 @@ meta_core_user_lower_and_unfocus (Display *xdisplay, g_list_append (window->screen->active_workspace->mru_list, window); } - - /* focus on the (new) topmost window */ - if (window->has_focus) - meta_workspace_focus_default_window (window->screen->active_workspace, - window, - timestamp); } + + /* focus the default window, if needed */ + if (window->has_focus) + meta_workspace_focus_default_window (window->screen->active_workspace, + NULL, + timestamp); } void diff --git a/src/display.c b/src/display.c index 6fffee1bf..02797acf5 100644 --- a/src/display.c +++ b/src/display.c @@ -1784,7 +1784,7 @@ event_callback (XEvent *event, switch (meta_prefs_get_focus_mode ()) { case META_FOCUS_MODE_MOUSE: - if (window->has_focus && + if (window == display->expected_focus_window && (window->frame == NULL || frame_was_receiver) && event->xcrossing.mode != NotifyGrab && event->xcrossing.mode != NotifyUngrab && |