window: Force NORMAL layer for tile preview

The tile preview is expected to be shown underneath the focus window.
However the code that restacks the preview broke when override-redirect
windows were moved to a separate window group.
To fix, special-case tile previews to put them in the NORMAL layer.

https://bugzilla.gnome.org/show_bug.cgi?id=696053
This commit is contained in:
Florian Müllner 2013-03-08 23:20:45 +01:00
parent d944bda7b9
commit 884ab602cb

View File

@ -1415,6 +1415,9 @@ meta_window_new_with_attrs (MetaDisplay *display,
if (!window->override_redirect)
meta_stack_add (window->screen->stack,
window);
else if (window->screen->tile_preview != NULL &&
meta_tile_preview_get_xwindow (window->screen->tile_preview, NULL) == xwindow)
window->layer = META_LAYER_NORMAL;
else
window->layer = META_LAYER_OVERRIDE_REDIRECT; /* otherwise set by MetaStack */