X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c32ded32c384aaf63b3ada820ea65298e0fdf05..9513c5b609740c15322f2284e5e8b9609eeaa069:/src/mac/carbon/app.cpp diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 42e2c0aba8..0b4b57cc2f 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -231,12 +231,14 @@ short wxApp::MacHandleAEOApp(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNUSED(reply)) { - wxWindow* win = GetTopWindow() ; + wxWindow* win = GetTopWindow() ; if ( win ) { - win->Close(TRUE ) ; + wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, s_macExitMenuItemId); + if (!win->ProcessEvent(exitEvent)) + win->Close(TRUE ) ; } - else + else { ExitMainLoop() ; }