correctly forward status from applets to containment

Summary:
unfortunately hiddenvisibility is the "biggest" status
that makes computing the proper status tricky.
if an applet in the containment is hidden, we must not mark as
hidden the whole containment, because it's as if hidden was
(as it should be) the smallest in the enum

BUG:372062

Test Plan: touchpad plasmoid no longer hides the systray

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4174
This commit is contained in:
Marco Martin 2017-01-17 17:23:07 +01:00
parent c07851470a
commit 47ec9b84db
2 changed files with 4 additions and 1 deletions

View File

@ -255,6 +255,7 @@ public:
NeedsAttentionStatus = 3, /**< The Item needs attention **/
RequiresAttentionStatus = 4, /**< The Item needs persistent attention **/
AcceptingInputStatus = 5, /**< The Item is accepting input **/
//FIXME KF6: this should be the smallest status
HiddenStatus = 6 /**< The Item will be hidden totally **/
};
Q_ENUM(ItemStatus)

View File

@ -123,7 +123,9 @@ void ContainmentPrivate::checkStatus(Plasma::Types::ItemStatus appletStatus)
}
}
q->setStatus(appletStatus);
if (appletStatus > q->status() && appletStatus != Plasma::Types::HiddenStatus) {
q->setStatus(appletStatus);
}
}
void ContainmentPrivate::triggerShowAddWidgets()