signal availableScreenRectChanged for all applets

if the connect is done in containmentinterface only contaiments
will be able to see the rect changing, while applet would access it but
not be able to detect changes
This commit is contained in:
Marco Martin 2019-05-23 13:18:00 +02:00
parent b0850b1f6f
commit cb8bdb8edd
2 changed files with 4 additions and 7 deletions

View File

@ -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) {

View File

@ -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 <QObject *> ContainmentInterface::applets()