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.
icc-effect-5.14.5
Martin Gräßlin 2015-10-01 17:21:56 +02:00
parent b587926803
commit b5255de4b6
2 changed files with 9 additions and 9 deletions

View File

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

View File

@ -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
}