From 79d6c47a46879667837068e2c886e59d5d8541da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 9 Sep 2013 22:38:23 +0200 Subject: [PATCH] group aware restack accounts layer compatibility the restack code stacks under all members of an application this is a problem if the group contains a keep below or desktop etc. (while the other window is a normal one) what resulted in restacking the client "invalidly" above the window of the other layer but below all other memberso of its own group for no reason REVIEW: 112627 CCBUG: 110543 --- layers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layers.cpp b/layers.cpp index 18d35a7056..9ac899274c 100644 --- a/layers.cpp +++ b/layers.cpp @@ -450,7 +450,7 @@ void Workspace::restack(Client* c, Client* under) // 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)); - if (other && Client::belongToSameApplication(under, other)) { + if (other && other->layer() == c->layer() && Client::belongToSameApplication(under, other)) { under = (c == other) ? 0 : other; break; } @@ -468,7 +468,7 @@ void Workspace::restack(Client* c, Client* under) void Workspace::restackClientUnderActive(Client* c) { - if (!active_client || active_client == c) { + if (!active_client || active_client == c || active_client->layer() != c->layer()) { raiseClient(c); return; }