From: Stefan Csomor Date: Tue, 19 Jul 2011 17:56:57 +0000 (+0000) Subject: doing WakeUp in osx_carbon differently for the main event as well X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3e88d48700b1c9dd7f4654004a88a7b13b5f86ac doing WakeUp in osx_carbon differently for the main event as well git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/osx/carbon/evtloop.h b/include/wx/osx/carbon/evtloop.h index 9db46aa1da..8a80fef3fa 100644 --- a/include/wx/osx/carbon/evtloop.h +++ b/include/wx/osx/carbon/evtloop.h @@ -20,6 +20,8 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop public: wxGUIEventLoop(); + virtual void WakeUp(); + protected: virtual int DoDispatchTimeout(unsigned long timeout); diff --git a/src/osx/carbon/evtloop.cpp b/src/osx/carbon/evtloop.cpp index 255c08f0f2..d263effec7 100644 --- a/src/osx/carbon/evtloop.cpp +++ b/src/osx/carbon/evtloop.cpp @@ -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;