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
parent
f805db7c61
commit
2813e2814e
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue