summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <notmart@gmail.com>2017-01-18 19:19:40 (GMT)
committerMarco Martin <notmart@gmail.com>2017-01-18 19:19:40 (GMT)
commitdd0d19d04b51fee0f173f3334874fb53a2112461 (patch)
tree93b9f82d9a32c1eef4500612f06acac94fb9e1bd
parentb2c6aa5b3499ee020b37083d67e742d912502b33 (diff)
Corona::screenGeometryChanged on qscreen resized
when the screen is resized, emit screenGeometryChanged availableScreenRegionChanged availableScreenRectChanged to notify all the applets
-rw-r--r--shell/shellcorona.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
index 1337523..290d23e 100644
--- a/shell/shellcorona.cpp
+++ b/shell/shellcorona.cpp
@@ -1150,7 +1150,16 @@ void ShellCorona::addOutput(QScreen* screen)
DesktopView *view = new DesktopView(this, screen);
connect(view, &QQuickWindow::sceneGraphError, this, &ShellCorona::showOpenGLNotCompatibleWarning);
-
+#if PLASMA_VERSION >= QT_VERSION_CHECK(5, 31, 0)
+ connect(screen, &QScreen::geometryChanged, this, [=]() {
+ const int id = m_screenPool->id(screen->name());
+ if (id >= 0) {
+ emit screenGeometryChanged(id);
+ emit availableScreenRegionChanged();
+ emit availableScreenRectChanged();
+ }
+ });
+#endif
Plasma::Containment *containment = createContainmentForActivity(m_activityController->currentActivity(), insertPosition);
Q_ASSERT(containment);