diff --git a/qmlpackages/desktop/contents/ui/CompactApplet.qml b/qmlpackages/desktop/contents/ui/CompactApplet.qml index 6e7e842e7..dca851933 100644 --- a/qmlpackages/desktop/contents/ui/CompactApplet.qml +++ b/qmlpackages/desktop/contents/ui/CompactApplet.qml @@ -44,12 +44,7 @@ Item { //windowFlags: Qt.Popup color: Qt.rgba(0,0,0,0) visible: plasmoid.expanded - onVisibleChanged: { - if (!visible) { - plasmoid.expanded = false - } - } - + visualParent: root mainItem: Rectangle { id: appletParent radius: 5 @@ -58,5 +53,16 @@ Item { onWidthChanged: applet.width = width onHeightChanged: applet.height = height } + + onActiveWindowChanged: { + if (!activeWindow) { + plasmoid.expanded = false + } + } + onVisibleChanged: { + if (!visible) { + plasmoid.expanded = false + } + } } }