summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <[email protected]>2023-01-17 16:34:25 +0100
committerTor Arne Vestbø <[email protected]>2023-01-18 17:23:13 +0000
commit2813e2814e185bf8d2426c5eb3d6b2c243ee72c3 (patch)
tree1d0ceb16e60724e8d61c9dc33034158de1f98890 /src/gui/kernel/qwindowsysteminterface.cpp
parentf805db7c61c646024bfec7cc0de3a1e9bb800792 (diff)
Respect custom QWSI event handler when delivering synchronous events
Pick-to: 6.5 6.4 Fixes: QTBUG-110268 Change-Id: I25195904cfc18d593db1be713b6e899e55eb922f Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 21091f66fa8..051fe38a485 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -98,7 +98,12 @@ bool QWindowSystemHelper<QWindowSystemInterface::SynchronousDelivery>::handleEve
if (QThread::currentThread() == QGuiApplication::instance()->thread()) {
EventType event(args...);
// Process the event immediately on the Gui thread and return the accepted state
- QGuiApplicationPrivate::processWindowSystemEvent(&event);
+ if (QWindowSystemInterfacePrivate::eventHandler) {
+ if (!QWindowSystemInterfacePrivate::eventHandler->sendEvent(&event))
+ return false;
+ } else {
+ QGuiApplicationPrivate::processWindowSystemEvent(&event);
+ }
return event.eventAccepted;
} else {
// Post the event on the Qt main thread queue and flush the queue.