Depend fs layer upon active state, not stackorder

according to NETWM spec implementation notes suggests
"focused windows having state _NET_WM_STATE_FULLSCREEN" to be on the highest layer.
We'll also take the screen into account
The user set stacking (being raised) is not considered by the spec note
This behavior is also suggested by an old comment in activation.cpp, void Workspace::setActiveClient()

BUG: 296076
CCBUG: 224600
REVIEW: 109572
FIXED-IN: 4.11
This commit is contained in:
Thomas Lübking 2013-03-18 17:26:34 +01:00
parent a5cce085af
commit 476ca65295
2 changed files with 14 additions and 18 deletions

View file

@ -868,22 +868,11 @@ bool Client::isActiveFullScreen() const
if (!isFullScreen())
return false;
// const Client* ac = workspace()->mostRecentlyActivatedClient(); // instead of activeClient() - avoids flicker
// if (!ac)
// return false;
// not needed, for xinerama -> && ( ac == this || this->group() == ac->group())
// only raise fullscreen above docks if it's the topmost window in unconstrained stacking order,
// i.e. the window set to be topmost by the user (also includes transients of the fullscreen window)
const Client* top = workspace()->topClientOnDesktop(VirtualDesktopManager::self()->current(), screen(), true, false);
if (!top)
return false;
// check whether we ...
if (top == this)
return true;
// ... or one of our transients is topmost
return rec_checkTransientOnTop(transients_list, top);
const Client* ac = workspace()->mostRecentlyActivatedClient(); // instead of activeClient() - avoids flicker
// according to NETWM spec implementation notes suggests
// "focused windows having state _NET_WM_STATE_FULLSCREEN" to be on the highest layer.
// we'll also take the screen into account
return ac && (ac == this || this->group() == ac->group() || ac->screen() != screen());
}
} // namespace

View file

@ -1577,6 +1577,15 @@ int Workspace::screenNumber(const QPoint& pos) const
void Workspace::sendClientToScreen(Client* c, int screen)
{
screen = c->rules()->checkScreen(screen);
if (c->isActive()) {
active_screen = screen;
// might impact the layer of a fullscreen window
foreach (Client *cc, clientList()) {
if (cc->isFullScreen() && cc->screen() == screen) {
updateClientLayer(cc);
}
}
}
if (c->screen() == screen) // Don't use isOnScreen(), that's true even when only partially
return;
GeometryUpdatesBlocker blocker(c);
@ -1602,8 +1611,6 @@ void Workspace::sendClientToScreen(Client* c, int screen)
it != transients_stacking_order.constEnd();
++it)
sendClientToScreen(*it, screen);
if (c->isActive())
active_screen = screen;
}
void Workspace::killWindowId(Window window_to_kill)