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 <volker.hilsheimer@qt.io>
bb10
Tor Arne Vestbø 2023-01-17 16:34:25 +01:00
parent f805db7c61
commit 2813e2814e
1 changed files with 6 additions and 1 deletions

View File

@ -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.