]> git.saurik.com Git - wxWidgets.git/commitdiff
make sure we can issue a WakeUp call that really triggers at the NSRunLoop level...
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 19 Jul 2011 16:17:44 +0000 (16:17 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 19 Jul 2011 16:17:44 +0000 (16:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/cocoa/evtloop.h
src/osx/cocoa/evtloop.mm

index e38cf92c388d4c292fe8a7750d0fbfe2e0e689b6..a327ee45deb977b70035eb1ba09aeacd76587383 100644 (file)
@@ -21,6 +21,8 @@ public:
     
     void EndModalSession();
 
+    virtual void WakeUp();
+
 protected:
     virtual int DoDispatchTimeout(unsigned long timeout);
 
index 4814425583f7b88a8f5380297b878f6f3be1d617..759c02b1ca9424a804a1a63c1f9daf382bd6d31c 100644 (file)
@@ -246,9 +246,14 @@ void wxGUIEventLoop::DoRun()
 
 void wxGUIEventLoop::DoStop()
 {
-    [NSApp stop:0];
     // only calling stop: is not enough when called from a runloop-observer,
     // therefore add a dummy event, to make sure the runloop gets another round
+    [NSApp stop:0];
+    WakeUp();
+}
+
+void wxGUIEventLoop::WakeUp()
+{
     NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined 
                                         location:NSMakePoint(0.0, 0.0) 
                                    modifierFlags:0