diff --git a/notificationd/screenhelper.cpp b/notificationd/screenhelper.cpp index a6d4ecc..306141a 100644 --- a/notificationd/screenhelper.cpp +++ b/notificationd/screenhelper.cpp @@ -24,6 +24,9 @@ ScreenHelper::ScreenHelper(QObject *parent) : QObject(parent) { + connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this, &ScreenHelper::screenGeometryChanged); + connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this, &ScreenHelper::availableScreenRectChanged); + connect(qApp->primaryScreen(), &QScreen::geometryChanged, this, &ScreenHelper::screenGeometryChanged); connect(qApp->primaryScreen(), &QScreen::availableGeometryChanged, this, &ScreenHelper::availableScreenRectChanged); } diff --git a/notificationd/screenhelper.h b/notificationd/screenhelper.h index 4ca4f1d..0f75007 100644 --- a/notificationd/screenhelper.h +++ b/notificationd/screenhelper.h @@ -22,6 +22,7 @@ #include #include +#include class ScreenHelper : public QObject {