summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2016-10-24 17:09:46 +0200
committerRui Matos <tiagomatos@gmail.com>2016-11-02 14:06:37 +0100
commit6054b1cdbd22dbcb5498d635aa3d6f1bf5f53c04 (patch)
tree7f91ea7b6b8382a17c8e907f5429f982b225021d
parentf3a9465fbd90726a32c275527cb3742cfa499ed4 (diff)
downloadmutter-6054b1cdbd22dbcb5498d635aa3d6f1bf5f53c04.tar.gz
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
-rw-r--r--src/core/screen.c10
-rw-r--r--src/core/stack.c4
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;