From 247ff0bdb6461d7ec2347dd230c77e1102201af8 Mon Sep 17 00:00:00 2001 From: Eugene Popov Date: Wed, 1 Apr 2020 09:32:25 -0600 Subject: [PATCH] [applets/clipboard] Don't close when clicking history item if pop-up was pinned open by another applet Summary: The previous patch updates the pinned state only for the active applet. For instance, if you open the Networks applet and pin it, then switch to the Clipboard applet and click on the history item, then the Clipboard applet closes. This is because we need to use binding instead of assignment. See https://phabricator.kde.org/D28408. Reviewers: ngraham Reviewed By: ngraham Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D28483 --- .../systemtray/package/contents/ui/items/PlasmoidItem.qml | 7 +++++++ applets/systemtray/package/contents/ui/main.qml | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml b/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml index 18a8f640a..ae8e76ddb 100644 --- a/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml +++ b/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml @@ -96,4 +96,11 @@ AbstractItem { preloadFullRepresentationItem(fullRepresentationItem) } } + + Binding { + property: "hideOnWindowDeactivate" + value: !plasmoid.configuration.pin + target: plasmoidContainer.applet + when: null !== plasmoidContainer.applet + } } diff --git a/applets/systemtray/package/contents/ui/main.qml b/applets/systemtray/package/contents/ui/main.qml index 773fc8d5a..ce6645da6 100644 --- a/applets/systemtray/package/contents/ui/main.qml +++ b/applets/systemtray/package/contents/ui/main.qml @@ -89,10 +89,6 @@ MouseArea { target: plasmoid.configuration onExtraItemsChanged: plasmoid.nativeInterface.allowedPlasmoids = plasmoid.configuration.extraItems - onPinChanged: { - if (root.activeApplet) - root.activeApplet.hideOnWindowDeactivate = !plasmoid.configuration.pin; - } } CurrentItemHighLight {