X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bf77ee556a5418059139305e9edb05bde9b8a1d..5ea02ed5dfa37a4208486a3f6824658313f4ee08:/src/mac/app.cpp diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 3a18d6363f..baa2127bbf 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -219,13 +219,12 @@ 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 ) ; } - else - */ + else { ExitMainLoop() ; } @@ -610,10 +609,11 @@ bool wxApp::Initialize(int& argc, wxChar **argv) if ( argc > 1 ) { static const wxChar *ARG_PSN = _T("-psn_"); - if ( wxStrncmp(argv[1], ARG_PSN, sizeof(ARG_PSN) - 1) == 0 ) + if ( wxStrncmp(argv[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 ) { // remove this argument - memmove(argv, argv + 1, argc--); + --argc; + memmove(argv + 1, argv + 2, argc * sizeof(char *)); } } @@ -1011,14 +1011,6 @@ wxApp::wxApp() #endif } -bool wxApp::Initialized() -{ - if (GetTopWindow()) - return TRUE; - else - return FALSE; -} - int wxApp::MainLoop() { m_keepGoing = TRUE;