diff --git a/applets/systemtray/container/package/contents/ui/main.qml b/applets/systemtray/container/package/contents/ui/main.qml --- a/applets/systemtray/container/package/contents/ui/main.qml +++ b/applets/systemtray/container/package/contents/ui/main.qml @@ -29,24 +29,10 @@ Layout.minimumHeight: internalSystray.Layout.minimumHeight Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation - property Item internalSystray + property Item internalSystray: plasmoid.nativeInterface.internalSystray - Component.onCompleted: { - root.internalSystray = plasmoid.nativeInterface.internalSystray; - - if (root.internalSystray == null) { - return; - } + onInternalSystrayChanged: { root.internalSystray.parent = root; root.internalSystray.anchors.fill = root; } - - Connections { - target: plasmoid.nativeInterface - onInternalSystrayChanged: { - root.internalSystray = plasmoid.nativeInterface.internalSystray; - root.internalSystray.parent = root; - root.internalSystray.anchors.fill = root; - } - } } diff --git a/applets/systemtray/container/systemtraycontainer.cpp b/applets/systemtray/container/systemtraycontainer.cpp --- a/applets/systemtray/container/systemtraycontainer.cpp +++ b/applets/systemtray/container/systemtraycontainer.cpp @@ -43,12 +43,7 @@ { Applet::init(); - //in the first creation we immediately create the systray: so it's accessible during desktop scripting - uint id = config().readEntry("SystrayContainmentId", 0); - - if (id == 0) { - ensureSystrayExists(); - } + ensureSystrayExists(); } void SystemTrayContainer::ensureSystrayExists() @@ -132,10 +127,6 @@ } } } - - if (constraints & Plasma::Types::UiReadyConstraint) { - ensureSystrayExists(); - } } QQuickItem *SystemTrayContainer::internalSystray()