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