diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 54f82d195..702574939 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -125,6 +125,10 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant } }); + connect(applet()->containment()->corona(), &Plasma::Corona::availableScreenRegionChanged, + this, &ContainmentInterface::availableScreenRegionChanged); + connect(applet()->containment()->corona(), &Plasma::Corona::availableScreenRectChanged, + this, &ContainmentInterface::availableScreenRectChanged); } connect(this, &AppletInterface::expandedChanged, [=](bool expanded) { diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index c0e6721cd..08de166d1 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -167,13 +167,6 @@ void ContainmentInterface::init() this, &ContainmentInterface::actionsChanged); connect(m_containment.data()->actions(), &KActionCollection::removed, this, &ContainmentInterface::actionsChanged); - - if (m_containment->corona()) { - connect(m_containment->corona(), &Plasma::Corona::availableScreenRegionChanged, - this, &ContainmentInterface::availableScreenRegionChanged); - connect(m_containment->corona(), &Plasma::Corona::availableScreenRectChanged, - this, &ContainmentInterface::availableScreenRectChanged); - } } QList ContainmentInterface::applets()