2190
2192
/* fullscreen and normal layer */
2191
if (!(below->priv->type & belowMask))
2193
if (!(below->priv->type & belowMask))
2193
2194
if (stackLayerCheck (w, clientLeader, below))
2562
2562
CompWindowList transients;
2563
2563
CompWindowList ancestors;
2564
CompWindow *siblingToThisWindow;
2565
unsigned int stackMode;
2565
2567
/* Since the window list is being reordered in reconfigureXWindow
2566
2568
the list of windows which need to be restacked must be stored
2582
2584
xwc->sibling = ROOTPARENT (*w);
2587
/* First restack this window */
2585
2588
this->priv->reconfigureXWindow (valueMask, xwc);
2589
siblingToThisWindow = screen->findTopLevelWindow (xwc->sibling);
2590
stackMode = xwc->stack_mode;
2586
2592
xwc->sibling = ROOTPARENT (this);
2594
/* Now restack the transient children above */
2588
2595
for (CompWindowList::reverse_iterator w = transients.rbegin ();
2589
2596
w != transients.rend (); w++)
2591
2598
(*w)->priv->reconfigureXWindow (CWSibling | CWStackMode, xwc);
2592
2599
xwc->sibling = ROOTPARENT (*w);
2602
if (siblingToThisWindow && stackMode == Above)
2604
/* a normal window can be stacked above fullscreen windows but we
2605
don't want normal windows to be stacked above dock window so if
2606
the sibling we're stacking above is a fullscreen window we also
2607
update all dock windows. */
2608
if ((siblingToThisWindow->priv->type & CompWindowTypeFullscreenMask) &&
2609
(!(this->priv-> type & (CompWindowTypeFullscreenMask |
2610
CompWindowTypeDockMask))) &&
2611
!PrivateWindow::isAncestorTo (this, siblingToThisWindow))
2613
XWindowChanges dxwc;
2614
unsigned int dmask = CWSibling | CWStackMode;
2617
/* Find the sibling fullscreen window */
2618
for (dw = screen->windows ().back (); dw; dw = dw->prev)
2619
if (dw == siblingToThisWindow)
2622
/* Collect all dock windows first */
2623
CompWindowList dockWindows;
2624
for (; dw; dw = dw->prev)
2625
if (dw->priv->type & CompWindowTypeDockMask)
2626
dockWindows.push_back (dw);
2628
/* Then update the dock windows */
2629
foreach (CompWindow *dw, dockWindows)
2631
/* Stack above the window being stacked above the docks */
2632
dxwc.stack_mode = Above;
2633
dxwc.sibling = ROOTPARENT (this);
2635
dw->configureXWindow (dmask, &dxwc);
3062
if (sibling && mask)
3064
/* a normal window can be stacked above fullscreen windows but we
3065
don't want normal windows to be stacked above dock window so if
3066
the sibling we're stacking above is a fullscreen window we also
3067
update all dock windows. */
3068
if ((sibling->priv->type & CompWindowTypeFullscreenMask) &&
3069
(!(type & (CompWindowTypeFullscreenMask |
3070
CompWindowTypeDockMask))) &&
3071
!isAncestorTo (window, sibling))
3075
for (dw = screen->windows ().back (); dw; dw = dw->prev)
3079
/* Collect all dock windows first */
3080
CompWindowList dockWindows;
3081
for (; dw; dw = dw->prev)
3082
if (dw->priv->type & CompWindowTypeDockMask)
3083
dockWindows.push_back (dw);
3085
/* Then update the dock windows */
3086
foreach (CompWindow *dw, dockWindows)
3087
dw->configureXWindow (mask, xwc);