From 09d4faa008d77bc919b46d77f07a4e15a8f6cd21 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 26 Apr 2018 10:32:03 +0200 Subject: [PATCH] QtGui: Enable synchronous delivery for QWSysIf:::WindowScreenChangedEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-67777 Change-Id: I6d52b650fb33283010ef06259da83cdb2fd3483f Reviewed-by: Oliver Wolff Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qwindowsysteminterface.cpp | 5 +++-- src/gui/kernel/qwindowsysteminterface.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 5243ae66a2..c310ab5213 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -258,11 +258,12 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowStateChanged, QWindow *window, Qt: QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } -void QWindowSystemInterface::handleWindowScreenChanged(QWindow *window, QScreen *screen) +QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowScreenChanged, QWindow *window, QScreen *screen) { + QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e = new QWindowSystemInterfacePrivate::WindowScreenChangedEvent(window, screen); - QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); + QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } QT_DEFINE_QPA_EVENT_HANDLER(void, handleSafeAreaMarginsChanged, QWindow *window) diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index b22495f9d0..a7cc30be4b 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -205,6 +205,7 @@ public: template static void handleWindowStateChanged(QWindow *window, Qt::WindowStates newState, int oldState = -1); + template static void handleWindowScreenChanged(QWindow *window, QScreen *newScreen); template