summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2019-04-17 12:28:57 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2019-04-17 18:53:04 +0200
commitd2ca5cc26bf6a5a6c4860c02b4dc87402137ca71 (patch)
treeb72ad7c47b546583269d902d37f253d984b19029
parent3de6f7ebfe5ae5b3ed656e16f09a5ddd2145e0b7 (diff)
downloadmutter-d2ca5cc26bf6a5a6c4860c02b4dc87402137ca71.tar.gz
display: Fix inconsistent behavior with demand attention
When focus stealing prevention kicks in, mutter would set the demand attention flag on the window. Focus stealing prevention would also prevent the window from being raised and focused, which is expected as its precisely its purpose. Yet, when that occurs, the user expects the window which has just been prevented from being focused to be the next one in the MRU list, so that pressing [Alt]-[Tab] would raise and give focus to that window. This works fine when the window is placed on the primary monitor, but not when placed on another monitor, in which case the window which has been denied focus is placed ahead of the MRU list and pressing [Alt]-[Tab] would leave the focus on the current window. This is because of a mechanism in `meta_display_get_tab_list()` which forces the windows with the demand attention flag set to be placed first in the MRU list when they're placed on a workspace different from the current one. But because workspaces apply only to the primary monitor (by default), the windows placed on other outputs have their workspace set to `NULL` which forces them ahead of the MRU list by mistake. Fix this by using the appropriate `meta_window_located_on_workspace() function to check if the window is on another workspace. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/523
-rw-r--r--src/core/display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/display.c b/src/core/display.c
index e1477d3cd..0de99edb2 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2236,7 +2236,7 @@ meta_display_get_tab_list (MetaDisplay *display,
MetaWindow *l_window = w->data;
if (l_window->wm_state_demands_attention &&
- l_window->workspace != workspace &&
+ !meta_window_located_on_workspace (l_window, workspace) &&
IN_TAB_CHAIN (l_window, type))
tab_list = g_list_prepend (tab_list, l_window);
}