diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index 5e4a869394..a067dd6415 100644 --- a/src/osx/cocoa/evtloop.mm +++ b/src/osx/cocoa/evtloop.mm @@ -418,6 +418,7 @@ void wxModalEventLoop::OSXDoRun() { BeginModalSession(m_modalWindow); wxCFEventLoop::OSXDoRun(); + EndModalSession(); } else #endif @@ -428,16 +429,7 @@ void wxModalEventLoop::OSXDoRun() void wxModalEventLoop::OSXDoStop() { -#if OSX_USE_MODAL_SESSION - if ( m_modalWindow ) - { - EndModalSession(); - } - else -#endif - { - [NSApp abortModal]; - } + [NSApp abortModal]; } // we need our own version of ProcessIdle here in order to