Now sends an exit command to the app so Quit behaves as it should
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -231,12 +231,14 @@ short wxApp::MacHandleAEOApp(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU
|
|||||||
|
|
||||||
short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNUSED(reply))
|
short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNUSED(reply))
|
||||||
{
|
{
|
||||||
wxWindow* win = GetTopWindow() ;
|
wxWindow* win = GetTopWindow() ;
|
||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
win->Close(TRUE ) ;
|
wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, s_macExitMenuItemId);
|
||||||
|
if (!win->ProcessEvent(exitEvent))
|
||||||
|
win->Close(TRUE ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ExitMainLoop() ;
|
ExitMainLoop() ;
|
||||||
}
|
}
|
||||||
|
@@ -231,12 +231,14 @@ short wxApp::MacHandleAEOApp(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU
|
|||||||
|
|
||||||
short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNUSED(reply))
|
short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNUSED(reply))
|
||||||
{
|
{
|
||||||
wxWindow* win = GetTopWindow() ;
|
wxWindow* win = GetTopWindow() ;
|
||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
win->Close(TRUE ) ;
|
wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, s_macExitMenuItemId);
|
||||||
|
if (!win->ProcessEvent(exitEvent))
|
||||||
|
win->Close(TRUE ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ExitMainLoop() ;
|
ExitMainLoop() ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user