]> git.saurik.com Git - wxWidgets.git/commitdiff
wiring OnInit on osx to a later point in event processing
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 24 Jul 2013 06:14:48 +0000 (06:14 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 24 Jul 2013 06:14:48 +0000 (06:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/init.cpp
src/osx/carbon/app.cpp

index ee45254523a7b28c38c3e72ea8f011fb793aac6d..4de5ae9af936720c25b7bc165c3061d1257336cf 100644 (file)
@@ -473,6 +473,9 @@ int wxEntryReal(int& argc, wxChar **argv)
 
     wxTRY
     {
+#if defined(__WXOSX__) && wxOSX_USE_COCOA_OR_IPHONE
+        // everything done in OnRun using native callbacks
+#else
         // app initialization
         if ( !wxTheApp->CallOnInit() )
         {
@@ -488,7 +491,7 @@ int wxEntryReal(int& argc, wxChar **argv)
         } callOnExit;
 
         WX_SUPPRESS_UNUSED_WARN(callOnExit);
-
+#endif
         // app execution
         return wxTheApp->OnRun();
     }
index aee21c66f6a1b7893b85bd16e0fcf7e279b47cce..41e050311674414a6d5647299f33125bb28890a0 100644 (file)
@@ -401,13 +401,15 @@ void wxApp::MacReopenApp()
     }
 }
 
+#if wxOSX_USE_COCOA_OR_IPHONE
 void wxApp::OSXOnWillFinishLaunching()
 {
+    wxTheApp->OnInit();
 }
 
 void wxApp::OSXOnDidFinishLaunching()
 {
-    
+    wxTheApp->OnLaunched();
 }
 
 void wxApp::OSXOnWillTerminate()
@@ -415,6 +417,8 @@ void wxApp::OSXOnWillTerminate()
     wxCloseEvent event;
     event.SetCanVeto(false);
     wxTheApp->OnEndSession(event);
+    
+    wxTheApp->OnExit();
 }
 
 bool wxApp::OSXOnShouldTerminate()
@@ -423,6 +427,7 @@ bool wxApp::OSXOnShouldTerminate()
     wxTheApp->OnQueryEndSession(event);
     return !event.GetVeto();
 }
+#endif
 
 //----------------------------------------------------------------------
 // Macintosh CommandID support - converting between native and wx IDs