diff --git a/client.cpp b/client.cpp index 2a08fdf5b3..6d70b11d47 100644 --- a/client.cpp +++ b/client.cpp @@ -884,7 +884,7 @@ void Client::setShade(ShadeMode mode) shade_geometry_change = false; if (was_shade_mode == ShadeHover) { if (shade_below && workspace()->stackingOrder().indexOf(shade_below) > -1) - workspace()->restack(this, shade_below); + workspace()->restack(this, shade_below, true); if (isActive()) workspace()->activateNextClient(this); } else if (isActive()) { diff --git a/layers.cpp b/layers.cpp index e95305e110..91edc04102 100644 --- a/layers.cpp +++ b/layers.cpp @@ -432,10 +432,10 @@ void Workspace::lowerClientRequest(KWin::Client *c, NET::RequestSource src, xcb_ } -void Workspace::restack(Client* c, Client* under) +void Workspace::restack(Client* c, Client* under, bool force) { assert(unconstrained_stacking_order.contains(under)); - if (!Client::belongToSameApplication(under, c)) { + if (!force && !Client::belongToSameApplication(under, c)) { // put in the stacking order below _all_ windows belonging to the active application for (int i = 0; i < unconstrained_stacking_order.size(); ++i) { Client *other = qobject_cast(unconstrained_stacking_order.at(i)); diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index d48139dce4..8662f0a093 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -300,7 +300,7 @@ void TabBoxHandlerImpl::raiseClient(TabBoxClient* c) const void TabBoxHandlerImpl::restack(TabBoxClient *c, TabBoxClient *under) { Workspace::self()->restack(static_cast(c)->client(), - static_cast(under)->client()); + static_cast(under)->client(), true); } void TabBoxHandlerImpl::elevateClient(TabBoxClient *c, WId tabbox, bool b) const diff --git a/workspace.h b/workspace.h index bccc1c1fe3..4ecac3d787 100644 --- a/workspace.h +++ b/workspace.h @@ -176,7 +176,7 @@ public: void raiseClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp); void lowerClientRequest(Client* c, NET::RequestSource src, xcb_timestamp_t timestamp); void restackClientUnderActive(Client*); - void restack(Client *c, Client *under); + void restack(Client *c, Client *under, bool force = false); void updateClientLayer(Client* c); void raiseOrLowerClient(Client*); void resetUpdateToolWindowsTimer();