summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp46
1 files changed, 33 insertions, 13 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b63ed78c4b..bdffb985f7 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -42,14 +42,15 @@
#include "qguiapplication.h"
#include "private/qguiapplication_p.h"
-#include "private/qplatformintegrationfactory_qpa_p.h"
+#include <qpa/qplatformintegrationfactory_p.h>
#include "private/qevent_p.h"
#include "qfont.h"
-#include "qplatformfontdatabase_qpa.h"
-#include "qplatformwindow_qpa.h"
-#include "qplatformnativeinterface_qpa.h"
-#include "qplatformtheme_qpa.h"
-#include "qplatformintegration_qpa.h"
+#include <qpa/qplatformfontdatabase.h>
+#include <qpa/qplatformwindow.h>
+#include <qpa/qplatformnativeinterface.h>
+#include <qpa/qplatformtheme.h>
+#include <qpa/qplatformintegration.h>
+#include <qpa/qplatformdrag.h>
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/QVariant>
@@ -64,14 +65,14 @@
#include <private/qscreen_p.h>
#include <private/qdrawhelper_p.h>
-#include <QtGui/QPlatformIntegration>
+#include <qpa/qplatformintegration.h>
#include <QtGui/QGenericPluginFactory>
#include <QtGui/qstylehints.h>
#include <QtGui/qinputpanel.h>
#include <QtGui/qpixmapcache.h>
-#include <QtGui/qplatformtheme_qpa.h>
-#include <QtGui/qplatforminputcontext_qpa.h>
-#include <private/qplatforminputcontext_qpa_p.h>
+#include <qpa/qplatformtheme.h>
+#include <qpa/qplatforminputcontext.h>
+#include <qpa/qplatforminputcontext_p.h>
#include <QWindowSystemInterface>
#include "private/qwindowsysteminterface_qpa_p.h"
@@ -79,11 +80,11 @@
#include "private/qcursor_p.h"
#include "private/qdnd_p.h"
-#include <private/qplatformthemefactory_qpa_p.h>
-#include "qplatformdrag_qpa.h"
+#include <qpa/qplatformthemefactory_p.h>
+#include <qpa/qplatformdrag.h>
#ifndef QT_NO_CURSOR
-#include "qplatformcursor_qpa.h"
+#include <qpa/qplatformcursor.h>
#endif
#include <QtGui/QPixmap>
@@ -1090,6 +1091,10 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv
QGuiApplicationPrivate::reportLogicalDotsPerInchChange(
static_cast<QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *>(e));
break;
+ case QWindowSystemInterfacePrivate::ScreenRefreshRate:
+ QGuiApplicationPrivate::reportRefreshRateChange(
+ static_cast<QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *>(e));
+ break;
case QWindowSystemInterfacePrivate::ThemeChange:
QGuiApplicationPrivate::processThemeChanged(
static_cast<QWindowSystemInterfacePrivate::ThemeChangeEvent *>(e));
@@ -1750,6 +1755,21 @@ void QGuiApplicationPrivate::reportLogicalDotsPerInchChange(QWindowSystemInterfa
emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
}
+void QGuiApplicationPrivate::reportRefreshRateChange(QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e)
+{
+ // This operation only makes sense after the QGuiApplication constructor runs
+ if (QCoreApplication::startingUp())
+ return;
+
+ if (!e->screen)
+ return;
+
+ QScreen *s = e->screen.data();
+ s->d_func()->refreshRate = e->rate;
+
+ emit s->refreshRateChanged(s->refreshRate());
+}
+
void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent *e)
{
if (!e->exposed)