Make Qt process native and timer events on Cocoa applications
Since we don't spin any QEventLoop, we need to make sure events posted by the window system interface are processed. Change-Id: I0e7b541d86a7a14f2ecd3702e7cbdbdee9920859 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
parent
1e14762b8d
commit
e4b2a0b4ba
@ -111,11 +111,6 @@ static Boolean runLoopSourceEqualCallback(const void *info1, const void *info2)
|
||||
void QCocoaEventDispatcherPrivate::runLoopTimerCallback(CFRunLoopTimerRef, void *info)
|
||||
{
|
||||
QCocoaEventDispatcherPrivate *d = static_cast<QCocoaEventDispatcherPrivate *>(info);
|
||||
if ((d->processEventsFlags & QEventLoop::EventLoopExec) == 0) {
|
||||
// processEvents() was called "manually," ignore this source for now
|
||||
d->maybeCancelWaitForMoreEvents();
|
||||
return;
|
||||
}
|
||||
CFRunLoopSourceSignal(d->activateTimersSourceRef);
|
||||
}
|
||||
|
||||
@ -810,11 +805,6 @@ void QCocoaEventDispatcherPrivate::firstLoopEntry(CFRunLoopObserverRef ref,
|
||||
void QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void *info)
|
||||
{
|
||||
QCocoaEventDispatcherPrivate *d = static_cast<QCocoaEventDispatcherPrivate *>(info);
|
||||
if ((d->processEventsFlags & QEventLoop::EventLoopExec) == 0) {
|
||||
// processEvents() was called "manually," ignore this source for now
|
||||
d->maybeCancelWaitForMoreEvents();
|
||||
return;
|
||||
}
|
||||
d->processPostedEvents();
|
||||
d->maybeCancelWaitForMoreEvents();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user