#import <Foundation/NSArray.h>
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSThread.h>
+#import <AppKit/NSEvent.h>
// ----------------------------------------------------------------------------
// globals
m_isInAssert = FALSE;
#endif // __WXDEBUG__
-
argc = 0;
argv = NULL;
m_cocoaApp = NULL;
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