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
This commit is contained in:
Stefan Csomor
2011-07-19 17:56:57 +00:00
parent 85a74f93bf
commit 3e88d48700
2 changed files with 12 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
public:
wxGUIEventLoop();
virtual void WakeUp();
protected:
virtual int DoDispatchTimeout(unsigned long timeout);

View 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;