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