trying 10.5 / 10.6 fix for #15688

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2013-12-09 21:09:34 +00:00
parent 2d8b8e1725
commit 79ec1e6c30

View File

@@ -397,6 +397,8 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow)
// END move into a evtloop_osx.cpp
#define OSX_USE_MODAL_SESSION 1
void wxModalEventLoop::OSXDoRun()
{
wxMacAutoreleasePool pool;
@@ -412,13 +414,31 @@ void wxModalEventLoop::OSXDoRun()
[NSApp sendEvent:event];
}
}
[NSApp runModalForWindow:m_modalNativeWindow];
#if OSX_USE_MODAL_SESSION
if ( m_modalWindow )
{
BeginModalSession(m_modalWindow);
wxCFEventLoop::OSXDoRun();
}
else
#endif
{
[NSApp runModalForWindow:m_modalNativeWindow];
}
}
void wxModalEventLoop::OSXDoStop()
{
[NSApp abortModal];
#if OSX_USE_MODAL_SESSION
if ( m_modalWindow )
{
EndModalSession();
}
else
#endif
{
[NSApp abortModal];
}
}
// we need our own version of ProcessIdle here in order to