From b0016ea9a6b225757e3ee06b50e8f7d05463ddf7 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Mon, 21 Sep 2009 11:58:21 +0200 Subject: On Mac, the posted events are processed on the first time in the loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Mac OS X, we use a custom source for posted events. The first time the event loop is entered, the custom source is added to the native event dispatcher but the events are not processed. In Qt, we expect those events to be processed. To work around the problem, a new observer is added to the event loop. This observer is only triggered the first time the event loop is entered. When the observer is triggered, the posted events are sent. Task-number: QTBUG-4521 Reviewed-by: Richard Moe Gustavsen Reviewed-by: João Abecasis --- src/gui/kernel/qeventdispatcher_mac_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qeventdispatcher_mac_p.h') diff --git a/src/gui/kernel/qeventdispatcher_mac_p.h b/src/gui/kernel/qeventdispatcher_mac_p.h index e94d98a024..15bc6f8e6f 100644 --- a/src/gui/kernel/qeventdispatcher_mac_p.h +++ b/src/gui/kernel/qeventdispatcher_mac_p.h @@ -196,6 +196,7 @@ private: static void activateTimer(CFRunLoopTimerRef, void *info); static void waitingObserverCallback(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info); + static void firstLoopEntry(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info); }; #ifdef QT_MAC_USE_COCOA -- cgit v1.2.1