pending events detected didn't work properly, go the safe route now, fixes #11797

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2010-03-08 11:08:10 +00:00
parent 9bbb78b9c1
commit a765eef35f

View 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()