diff options
author | Elijah Newren <newren@gmail.com> | 2005-08-01 04:58:58 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2005-08-01 04:58:58 +0000 |
commit | 1b2e5e56a8f940e3104e1e68ab6e505f18eda3fc (patch) | |
tree | c16ee0f4bd7c06316b4d04fd32bb0e91d64cdf56 /src/stack.c | |
parent | 7a9be72bdf10c0962f70d6b7d677cea4e5e83784 (diff) | |
download | metacity-1b2e5e56a8f940e3104e1e68ab6e505f18eda3fc.tar.gz |
use only the expected_focus_window instead of both the focused_window and
2005-07-31 Elijah Newren <newren@gmail.com>
* src/stack.c (is_focused_foreach, get_standalone_layer): use only
the expected_focus_window instead of both the focused_window and
the expected_focus_window. Removes an infinite flicker loop in
sloppy and mouse focus, and an ugly one time flicker in click to
focus. Fixes #311400.
Diffstat (limited to 'src/stack.c')
-rw-r--r-- | src/stack.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/stack.c b/src/stack.c index 7fb02b16..e81cbfb2 100644 --- a/src/stack.c +++ b/src/stack.c @@ -242,8 +242,7 @@ static gboolean is_focused_foreach (MetaWindow *window, void *data) { - if (window->has_focus || - (window == window->display->expected_focus_window)) + if (window == window->display->expected_focus_window) { *((gboolean*) data) = TRUE; return FALSE; @@ -291,12 +290,12 @@ get_standalone_layer (MetaWindow *window) if (window->wm_state_below) layer = META_LAYER_BOTTOM; else if ((window->fullscreen || window_is_fullscreen_size (window)) && - (window->has_focus || focused_transient || + (focused_transient || window == window->display->expected_focus_window || - window->display->focus_window == NULL || - (window->display->focus_window != NULL && + window->display->expected_focus_window == NULL || + (window->display->expected_focus_window != NULL && windows_on_different_xinerama (window, - window->display->focus_window)))) + window->display->expected_focus_window)))) layer = META_LAYER_FULLSCREEN; else if (window->wm_state_above) layer = META_LAYER_DOCK; |