]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/app.cpp
using Run of base class
[wxWidgets.git] / src / osx / carbon / app.cpp
index 41e050311674414a6d5647299f33125bb28890a0..c8e358c18515cfd7d30e3525d9aa25d28b995cbf 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     1998-01-01
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -410,6 +409,7 @@ void wxApp::OSXOnWillFinishLaunching()
 void wxApp::OSXOnDidFinishLaunching()
 {
     wxTheApp->OnLaunched();
+    wxEventLoopBase::SetActive(GetMainLoop());
 }
 
 void wxApp::OSXOnWillTerminate()
@@ -418,6 +418,11 @@ void wxApp::OSXOnWillTerminate()
     event.SetCanVeto(false);
     wxTheApp->OnEndSession(event);
     
+    wxGUIEventLoop* mainloop = dynamic_cast<wxGUIEventLoop*>(GetMainLoop());
+    if ( mainloop )
+        mainloop->OSXOnWillTerminate();
+    wxEventLoopBase::SetActive(NULL);
+
     wxTheApp->OnExit();
 }