Cocoa: Make QMacNativeWidget event processing work
Don't interrupt the Qt event loop if the Qt event loop isn't running (meaning processEvents has not/ will not be called). This can happen in the QMacNativeWidget or plugin case where the native code calls [NSApp run] and QApplication::exec() is never called. In Qt 4 this was not necessary since UI event processing was more direct: QCocoaView would call QCoreApplication::sendMouseEvent/sendSpontaneousEvent directly on mouse events. Task-number: QTBUG-36225 Change-Id: I2894cbbca66a902652c9f8bc916e94ad8ce0e18e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
365cd4adeb
commit
9e02f9cf08
@ -870,7 +870,7 @@ void QCocoaEventDispatcherPrivate::processPostedEvents()
|
||||
return;
|
||||
}
|
||||
|
||||
if (interrupt) {
|
||||
if (processEventsCalled > 0 && interrupt) {
|
||||
if (currentExecIsNSAppRun) {
|
||||
// The event dispatcher has been interrupted. But since
|
||||
// [NSApplication run] is running the event loop, we
|
||||
|
Loading…
Reference in New Issue
Block a user