diff --git a/applets/systemtray/package/contents/applet/CompactApplet.qml b/applets/systemtray/package/contents/applet/CompactApplet.qml --- a/applets/systemtray/package/contents/applet/CompactApplet.qml +++ b/applets/systemtray/package/contents/applet/CompactApplet.qml @@ -70,6 +70,10 @@ } } + onFullRepresentationChanged: { + fullRepresentation.visible = false; + fullRepresentation.parent = plasmoid.parent.dialog.mainItem; + } onCompactRepresentationChanged: { if (compactRepresentation) { compactRepresentation.parent = appletRoot; diff --git a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml --- a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml +++ b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml @@ -26,6 +26,9 @@ Item { id: expandedRepresentation + //set width/height to avoid an useless Dialog resize + width: Layout.minimumWidth + height: Layout.minimumHeight Layout.minimumWidth: units.gridUnit * 24 Layout.minimumHeight: units.gridUnit * 21 Layout.preferredWidth: Layout.minimumWidth diff --git a/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml b/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml --- a/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml +++ b/applets/systemtray/package/contents/ui/items/PlasmoidItem.qml @@ -25,6 +25,7 @@ id: plasmoidContainer property Item applet + property PlasmaCore.Dialog dialog: dialog iconItem: applet text: applet ? applet.title : "" diff --git a/applets/systemtray/package/contents/ui/main.qml b/applets/systemtray/package/contents/ui/main.qml --- a/applets/systemtray/package/contents/ui/main.qml +++ b/applets/systemtray/package/contents/ui/main.qml @@ -105,7 +105,8 @@ if (!plasmoidItemComponent) { plasmoidItemComponent = Qt.createComponent("items/PlasmoidItem.qml"); } - var plasmoidContainer = plasmoidItemComponent.createObject(invisibleEntriesContainer, {"x": x, "y": y, "applet": applet}); + //Allow the plasmoid expander to know in what window it will be + var plasmoidContainer = plasmoidItemComponent.createObject(invisibleEntriesContainer, {"x": x, "y": y, "applet": applet, "dialog": dialog}); applet.parent = plasmoidContainer applet.anchors.left = plasmoidContainer.left diff --git a/applets/systemtray/systemtray.h b/applets/systemtray/systemtray.h --- a/applets/systemtray/systemtray.h +++ b/applets/systemtray/systemtray.h @@ -27,6 +27,7 @@ class QDBusPendingCallWatcher; class QDBusConnection; class QQuickItem; +class QQuickWindow; class PlasmoidModel; class SystemTray : public Plasma::Containment