allow forcefull restacking

when restacking for shaded windows and uncomposited tabboxes
the group check should not be applied since we know better
eg. to restore a former order

CCBUG: 186206
REVIEW: 122469
icc-effect-5.14.5
Thomas Lübking 2015-02-06 23:00:34 +01:00
parent 2a29324294
commit ea5a5f196d
4 changed files with 5 additions and 5 deletions

View File

@ -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()) {

View File

@ -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<Client*>(unconstrained_stacking_order.at(i));

View File

@ -300,7 +300,7 @@ void TabBoxHandlerImpl::raiseClient(TabBoxClient* c) const
void TabBoxHandlerImpl::restack(TabBoxClient *c, TabBoxClient *under)
{
Workspace::self()->restack(static_cast<TabBoxClientImpl*>(c)->client(),
static_cast<TabBoxClientImpl*>(under)->client());
static_cast<TabBoxClientImpl*>(under)->client(), true);
}
void TabBoxHandlerImpl::elevateClient(TabBoxClient *c, WId tabbox, bool b) const

View File

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