]> git.saurik.com Git - wxWidgets.git/commitdiff
doing WakeUp in osx_carbon differently for the main event as well
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 19 Jul 2011 17:56:57 +0000 (17:56 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 19 Jul 2011 17:56:57 +0000 (17:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/carbon/evtloop.h
src/osx/carbon/evtloop.cpp

index 9db46aa1dabe2ef17825fc1b400381c93b81fff6..8a80fef3fa12cc207ea302cb6c47df96f82de84c 100644 (file)
@@ -20,6 +20,8 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
 public:
     wxGUIEventLoop();
 
+    virtual void WakeUp();
+
 protected:
     virtual int DoDispatchTimeout(unsigned long timeout);
 
index 255c08f0f2a20df73f7fa19c57bf1288eba6ca2a..d263effec7c44f1a8bd32be3db9c0afda0c145b2 100644 (file)
@@ -83,6 +83,16 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout)
     }
 }
 
+void wxGUIEventLoop::WakeUp()
+{
+    OSStatus err = noErr;
+    wxMacCarbonEvent wakeupEvent;
+    wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(),
+                        kEventAttributeNone );
+    err = PostEventToQueue(GetMainEventQueue(), wakeupEvent,
+                            kEventPriorityHigh );
+}
+
 void wxGUIEventLoop::DoRun()
 {
     wxMacAutoreleasePool autoreleasepool;