diff --git a/nymea-app/nymea-app.pro b/nymea-app/nymea-app.pro index 3abecb1d..328e48c8 100644 --- a/nymea-app/nymea-app.pro +++ b/nymea-app/nymea-app.pro @@ -55,10 +55,6 @@ win32 { QT += webview } -linux:!android: { - PKGCONFIG += ply-boot-client -} - android { include(../3rdParty/android/android_openssl/openssl.pri) diff --git a/nymea-app/platformintegration/generic/screenhelper.cpp b/nymea-app/platformintegration/generic/screenhelper.cpp index 96b234a9..833a3b52 100644 --- a/nymea-app/platformintegration/generic/screenhelper.cpp +++ b/nymea-app/platformintegration/generic/screenhelper.cpp @@ -87,8 +87,16 @@ ScreenHelper::ScreenHelper(QObject *parent) : QObject(parent) foreach (QWindow *w, qApp->topLevelWindows()) { w->installEventFilter(this); + m_watchedWindows.append(w); } + connect(qApp, &QGuiApplication::focusWindowChanged, this, [=](QWindow *w){ + if (!m_watchedWindows.contains(w)) { + w->installEventFilter(this); + m_watchedWindows.append(w); + } + }); + QSettings settings; m_currentBrightness = settings.value("screenBrightness", 80).toInt(); @@ -122,6 +130,7 @@ int ScreenHelper::screenTimeout() const void ScreenHelper::setScreenTimeout(int timeout) { + qCInfo(dcPlatformIntegration()) << "Set screen timeout to" << timeout << "ms"; m_screenDimTimer.setInterval(timeout); QSettings settings; settings.setValue("screenOffTimeout", timeout); diff --git a/nymea-app/platformintegration/generic/screenhelper.h b/nymea-app/platformintegration/generic/screenhelper.h index 956b45ca..035a5782 100644 --- a/nymea-app/platformintegration/generic/screenhelper.h +++ b/nymea-app/platformintegration/generic/screenhelper.h @@ -35,6 +35,8 @@ #include #include +class QWindow; + class ScreenHelper : public QObject { Q_OBJECT @@ -63,6 +65,8 @@ private: QFile m_powerFile; QFile m_brightnessFile; + QList m_watchedWindows; + bool m_cursorHidden = false; int m_maxBrightness = -1; diff --git a/packaging/ubuntu/debian/control b/packaging/ubuntu/debian/control index 15af1cac..9b9e8d17 100644 --- a/packaging/ubuntu/debian/control +++ b/packaging/ubuntu/debian/control @@ -17,7 +17,6 @@ Build-Depends: debhelper (>= 9.0.0), qtconnectivity5-dev, qtdeclarative5-dev, qtquickcontrols2-5-dev, - libplymouth-dev, Package: nymea-app Architecture: any