From f3b69b0ed0d3fa863ed4b2233ac5ce6c5fcdd9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 13 May 2015 22:31:22 +0200 Subject: [PATCH] Showing Desktop: keep docks visible REVIEW: 123783 BUG: 346933 BUG: 347212 CCBUG: 346837 FIXED-IN: 5.3.1 --- layers.cpp | 7 +++++++ workspace.cpp | 14 +++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/layers.cpp b/layers.cpp index b6d5b75f8f..449cf3a967 100644 --- a/layers.cpp +++ b/layers.cpp @@ -826,11 +826,18 @@ Layer Client::layer() const Layer Client::belongsToLayer() const { + // NOTICE while showingDesktop, desktops move to the AboveLayer + // (interchangeable w/ eg. yakuake etc. which will at first remain visible) + // and the docks move into the NotificationLayer (which is between Above- and + // ActiveLayer, so that active fullscreen windows will still cover everything) + // Since the desktop is also activated, nothing should be in the ActiveLayer, though if (isDesktop()) return workspace()->showingDesktop() ? AboveLayer : DesktopLayer; if (isSplash()) // no damn annoying splashscreens return NormalLayer; // getting in the way of everything else if (isDock()) { + if (workspace()->showingDesktop()) + return NotificationLayer; // slight hack for the 'allow window to cover panel' Kicker setting // don't move keepbelow docks below normal window, but only to the same // layer, so that both may be raised to cover the other diff --git a/workspace.cpp b/workspace.cpp index 09ae9a2c11..3479a14bcb 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1207,11 +1207,15 @@ void Workspace::setShowingDesktop(bool showing) StackingUpdatesBlocker blocker(this); // updateLayer & lowerClient would invalidate stacking_order for (int i = stacking_order.count() - 1; i > -1; --i) { Client *c = qobject_cast(stacking_order.at(i)); - if (c && c->isOnCurrentDesktop() && c->isDesktop() && c->isShown(true)) { - c->updateLayer(); - lowerClient(c); - if (!topDesk) - topDesk = c; + if (c && c->isOnCurrentDesktop()) { + if (c->isDock()) { + c->updateLayer(); + } else if (c->isDesktop() && c->isShown(true)) { + c->updateLayer(); + lowerClient(c); + if (!topDesk) + topDesk = c; + } } } } // ~StackingUpdatesBlocker