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:
@@ -99,13 +99,21 @@ CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
|
|||||||
|
|
||||||
bool wxGUIEventLoop::Pending() 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;
|
wxMacAutoreleasePool autoreleasepool;
|
||||||
// a pointer to the event is returned if there is one, or nil if not
|
|
||||||
return [[NSApplication sharedApplication]
|
return [[NSApplication sharedApplication]
|
||||||
nextEventMatchingMask: NSAnyEventMask
|
nextEventMatchingMask: NSAnyEventMask
|
||||||
untilDate: nil
|
untilDate: nil
|
||||||
inMode: NSDefaultRunLoopMode
|
inMode: NSDefaultRunLoopMode
|
||||||
dequeue: NO];
|
dequeue: NO] != nil;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGUIEventLoop::Dispatch()
|
bool wxGUIEventLoop::Dispatch()
|
||||||
|
Reference in New Issue
Block a user