]> git.saurik.com Git - wxWidgets.git/commitdiff
pending events detected didn't work properly, go the safe route now, fixes #11797
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 8 Mar 2010 11:08:10 +0000 (11:08 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 8 Mar 2010 11:08:10 +0000 (11:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/evtloop.mm

index ecd63279c28c209c230389ef28692b8679586bef..d22e47a0e006b09aef9818579ae4c392b57b5973 100644 (file)
@@ -99,13 +99,21 @@ CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
 
 bool wxGUIEventLoop::Pending() const
 {
+#if 0
+    // this code doesn't reliably detect pending events
+    // so better return true and have the dispatch deal with it
+    // as otherwise we end up in a tight loop when idle events are responded
+    // to by RequestMore(true)
     wxMacAutoreleasePool autoreleasepool;
-    // a pointer to the event is returned if there is one, or nil if not
+  
     return [[NSApplication sharedApplication]
             nextEventMatchingMask: NSAnyEventMask
             untilDate: nil
             inMode: NSDefaultRunLoopMode
-            dequeue: NO];
+            dequeue: NO] != nil;
+#else
+    return true;
+#endif
 }
 
 bool wxGUIEventLoop::Dispatch()