stack: Rewrite to not be based on X11 xtransient_for properties

This fixes some stacking issues with Wayland windows.
This commit is contained in:
Jasper St. Pierre 2014-08-13 18:21:31 -04:00
parent 7fa15c74b4
commit e76be14dbb

View File

@ -46,9 +46,7 @@
w->type == META_WINDOW_UTILITY) w->type == META_WINDOW_UTILITY)
#define WINDOW_TRANSIENT_FOR_WHOLE_GROUP(w) \ #define WINDOW_TRANSIENT_FOR_WHOLE_GROUP(w) \
((w->xtransient_for == None || \ (WINDOW_HAS_TRANSIENT_TYPE (w) && w->transient_for == NULL)
w->transient_parent_is_root_window) && \
WINDOW_HAS_TRANSIENT_TYPE (w))
#define WINDOW_IN_STACK(w) (w->stack_position >= 0) #define WINDOW_IN_STACK(w) (w->stack_position >= 0)
@ -414,8 +412,7 @@ compute_layer (MetaWindow *window)
*/ */
if (window->layer != META_LAYER_DESKTOP && if (window->layer != META_LAYER_DESKTOP &&
WINDOW_HAS_TRANSIENT_TYPE(window) && WINDOW_HAS_TRANSIENT_TYPE(window) &&
(window->xtransient_for == None || window->transient_for == NULL)
window->transient_parent_is_root_window))
{ {
/* We only do the group thing if the dialog is NOT transient for /* We only do the group thing if the dialog is NOT transient for
* a particular window. Imagine a group with a normal window, a dock, * a particular window. Imagine a group with a normal window, a dock,
@ -636,13 +633,11 @@ create_constraints (Constraint **constraints,
g_slist_free (group_windows); g_slist_free (group_windows);
} }
else if (w->xtransient_for != None && else if (w->transient_for != NULL)
!w->transient_parent_is_root_window)
{ {
MetaWindow *parent; MetaWindow *parent;
parent = parent = w->transient_for;
meta_display_lookup_x_window (w->display, w->xtransient_for);
if (parent && WINDOW_IN_STACK (parent) && if (parent && WINDOW_IN_STACK (parent) &&
parent->screen == w->screen) parent->screen == w->screen)