Commit 1e2a0028 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Move keep-above clients to the Normal layer when showing desktop

Implementation of the Show Desktop feature moves desktop windows to
the Above layer, but it doesn't take into account existing clients
that belong to the Above layer. If there are any, we have to move
them to a layer below (e.g. normal), otherwise those clients will be
visible when showing the desktop.

BUG: 406101

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision:
parent 68fca9a6
......@@ -374,7 +374,7 @@ Layer AbstractClient::belongsToLayer() const
if (isActiveFullScreen())
return ActiveLayer;
if (keepAbove())
return AboveLayer;
return workspace()->showingDesktop() ? NormalLayer : AboveLayer;
return NormalLayer;
......@@ -1276,7 +1276,9 @@ void Workspace::setShowingDesktop(bool showing)
for (int i = stacking_order.count() - 1; i > -1; --i) {
AbstractClient *c = qobject_cast<AbstractClient*>(;
if (c && c->isOnCurrentDesktop()) {
if (c->isDock()) {
// When showing desktop we'd like to raise docks above desktop
// windows and move keep-above clients to the normal layer.
if (c->isDock() || c->keepAbove()) {
} else if (c->isDesktop() && c->isShown(true)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment