From bfb46ff85041b04538d899c581056c77214e3ae0 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Mon, 24 Oct 2016 17:09:46 +0200 Subject: [PATCH] stack: Stack docks below other windows on fullscreen monitors Commit fcc7501eb8dab5c1749e5421e31311fd14fd73f0 had the side-effect of stacking fullscreen windows below docks which went unnoticed since we don't use docks in GNOME anymore. Instead of re-introducing the fullscreen layer, which we don't need otherwise, we can fix this issue by ensuring we stack docks below all other windows when the monitor they're on is marked fullscreen. This has the added benefit that the visibility rule for 3rd party docks becomes the same as gnome-shell's chrome. https://bugzilla.gnome.org/show_bug.cgi?id=772937 --- src/core/screen.c | 10 +++++++++- src/core/stack.c | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/core/screen.c b/src/core/screen.c index 4fbf22456..b8ac22f76 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -2888,7 +2888,15 @@ check_fullscreen_func (gpointer data) g_slist_free (fullscreen_monitors); if (in_fullscreen_changed) - g_signal_emit (screen, screen_signals[IN_FULLSCREEN_CHANGED], 0, NULL); + { + /* DOCK window stacking depends on the monitor's fullscreen + status so we need to trigger a re-layering. */ + MetaWindow *window = meta_stack_get_top (screen->stack); + if (window) + meta_stack_update_layer (screen->stack, window); + + g_signal_emit (screen, screen_signals[IN_FULLSCREEN_CHANGED], 0, NULL); + } return FALSE; } diff --git a/src/core/stack.c b/src/core/stack.c index 1375f26fa..a9f6d1dac 100644 --- a/src/core/stack.c +++ b/src/core/stack.c @@ -286,8 +286,8 @@ get_standalone_layer (MetaWindow *window) break; case META_WINDOW_DOCK: - /* still experimenting here */ - if (window->wm_state_below) + if (window->wm_state_below || + (window->monitor && window->monitor->in_fullscreen)) layer = META_LAYER_BOTTOM; else layer = META_LAYER_DOCK;