diff options
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 21091f66fa..051fe38a48 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. |