stack: Stack docks below other windows on fullscreen monitors

Commit fcc7501eb8 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
This commit is contained in:
Rui Matos 2016-10-24 17:09:46 +02:00
parent 2012eab842
commit bfb46ff850
2 changed files with 11 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;