From d91127ca5866802fc3e1b5181805e2ffa4f86ae4 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Fri, 22 Jul 2016 08:32:52 +0200 Subject: [PATCH] [Containment] Treat HiddenStatus as low status The containment's status is the max of all applets. Unfortunately, HiddenStatus, while semantically lower, has the highest value, so as soon as there's a hidden applet (eg. pager with just one virtual desktop), the panel will always auto-hide even when popups are open as its status will be HiddenStatus. REVIEW: 128301 --- src/plasma/private/containment_p.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plasma/private/containment_p.cpp b/src/plasma/private/containment_p.cpp index a72bb561f..ea1662abc 100644 --- a/src/plasma/private/containment_p.cpp +++ b/src/plasma/private/containment_p.cpp @@ -118,11 +118,11 @@ void ContainmentPrivate::checkStatus(Plasma::Types::ItemStatus appletStatus) return; } - if (appletStatus < q->status()) { - // check to see if any other applet has a higher status, and stick with that - // if we do + if (appletStatus < q->status() || appletStatus == Plasma::Types::HiddenStatus) { + // check to see if any other applet has a higher status, and stick with that if we do + // we'll treat HiddenStatus as lowest as we cannot change the enum value which is highest anymore foreach (Applet *applet, applets) { - if (applet->status() > appletStatus) { + if (applet->status() > appletStatus && applet->status() != Plasma::Types::HiddenStatus) { appletStatus = applet->status(); } }