Respect custom QWSI event handler when delivering synchronous events
Fixes: QTBUG-110268 Change-Id: I25195904cfc18d593db1be713b6e899e55eb922f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 2813e2814e185bf8d2426c5eb3d6b2c243ee72c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
af1aa812b3
commit
2877f076dd
@ -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…
x
Reference in New Issue
Block a user