From b5255de4b6075c34d66b14b79976587148c05877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 1 Oct 2015 17:21:56 +0200 Subject: [PATCH] Move layer updating for setActive back to AbstractClient AbstractClient now also supports mainClients, so we can do the fullscreen window check on setActive in a general way. This ensures that we do get proper stacking changes for activating fullscreen shell clients. --- abstract_client.cpp | 9 +++++++++ activation.cpp | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/abstract_client.cpp b/abstract_client.cpp index 0a35021589..3d7ae231dc 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -180,6 +180,15 @@ void AbstractClient::setActive(bool act) if (!m_active && shadeMode() == ShadeActivated) setShade(ShadeNormal); + StackingUpdatesBlocker blocker(workspace()); + workspace()->updateClientLayer(this); // active windows may get different layer + auto mainclients = mainClients(); + for (auto it = mainclients.constBegin(); + it != mainclients.constEnd(); + ++it) + if ((*it)->isFullScreen()) // fullscreens go high even if their transient is active + workspace()->updateClientLayer(*it); + doSetActive(); emit activeChanged(); updateMouseGrab(); diff --git a/activation.cpp b/activation.cpp index f5df424904..45b9176f77 100644 --- a/activation.cpp +++ b/activation.cpp @@ -788,15 +788,6 @@ xcb_timestamp_t Client::userTime() const void Client::doSetActive() { - StackingUpdatesBlocker blocker(workspace()); - workspace()->updateClientLayer(this); // active windows may get different layer - auto mainclients = mainClients(); - for (auto it = mainclients.constBegin(); - it != mainclients.constEnd(); - ++it) - if ((*it)->isFullScreen()) // fullscreens go high even if their transient is active - workspace()->updateClientLayer(*it); - updateUrgency(); // demand attention again if it's still urgent }