X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b79aa5000fef6952836829a48f3ef060b9c10594..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/osx/carbon/evtloop.cpp diff --git a/src/osx/carbon/evtloop.cpp b/src/osx/carbon/evtloop.cpp index adc340a714..d263effec7 100644 --- a/src/osx/carbon/evtloop.cpp +++ b/src/osx/carbon/evtloop.cpp @@ -60,7 +60,7 @@ static void DispatchAndReleaseEvent(EventRef theEvent) int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) { wxMacAutoreleasePool autoreleasepool; - + EventRef event; OSStatus status = ReceiveNextEvent(0, NULL, timeout/1000, true, &event); switch ( status ) @@ -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; @@ -126,7 +136,7 @@ void wxModalEventLoop::DoRun() WindowGroupRef windowGroup = NULL; WindowGroupRef formerParentGroup = NULL; - + // make sure modal dialogs are in the right layer so that they are not covered if ( m_modalWindow != NULL ) { @@ -143,7 +153,7 @@ void wxModalEventLoop::DoRun() } m_modalWindow->SetFocus(); - + RunAppModalLoopForWindow(m_modalNativeWindow); if ( resetGroupParent )