Implement wxApp::Yield
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSThread.h>
|
||||
#import <AppKit/NSEvent.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
@@ -192,7 +193,6 @@ wxApp::wxApp()
|
||||
m_isInAssert = FALSE;
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
|
||||
argc = 0;
|
||||
argv = NULL;
|
||||
m_cocoaApp = NULL;
|
||||
@@ -316,8 +316,15 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
|
||||
s_inYield = true;
|
||||
|
||||
wxLogDebug("WARNING: SUPPOSED to have yielded!");
|
||||
// FIXME: Do something!
|
||||
// Run the event loop until it is out of events
|
||||
while(NSEvent *event = [GetNSApplication()
|
||||
nextEventMatchingMask:NSAnyEventMask
|
||||
untilDate:[NSDate distantPast]
|
||||
inMode:NSDefaultRunLoopMode
|
||||
dequeue: YES])
|
||||
{
|
||||
[GetNSApplication() sendEvent: event];
|
||||
}
|
||||
|
||||
#if wxUSE_LOG
|
||||
// let the logs be flashed again
|
||||
|
Reference in New Issue
Block a user