int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout)
{
wxMacAutoreleasePool autoreleasepool;
-
+
EventRef event;
OSStatus status = ReceiveNextEvent(0, NULL, timeout/1000, true, &event);
switch ( status )
}
}
+void wxGUIEventLoop::WakeUp()
+{
+ OSStatus err = noErr;
+ wxMacCarbonEvent wakeupEvent;
+ wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(),
+ kEventAttributeNone );
+ err = PostEventToQueue(GetMainEventQueue(), wakeupEvent,
+ kEventPriorityHigh );
+}
+
void wxGUIEventLoop::DoRun()
{
wxMacAutoreleasePool autoreleasepool;
wxModalEventLoop::wxModalEventLoop(wxWindow *modalWindow)
{
- m_modalWindow = dynamic_cast<wxNonOwnedWindow*> (modalWindow);
+ m_modalWindow = wxDynamicCast(modalWindow, wxNonOwnedWindow);
wxASSERT_MSG( m_modalWindow != NULL, "must pass in a toplevel window for modal event loop" );
m_modalNativeWindow = m_modalWindow->GetWXWindow();
}
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 )
{
}
m_modalWindow->SetFocus();
-
+
RunAppModalLoopForWindow(m_modalNativeWindow);
if ( resetGroupParent )