]> git.saurik.com Git - wxWidgets.git/commitdiff
wiring event loop callbacks
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 27 Jul 2013 19:19:39 +0000 (19:19 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 27 Jul 2013 19:19:39 +0000 (19:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/app.cpp

index 80cc909f63f54d5aae18c327b2b3c594663d1f55..c8e358c18515cfd7d30e3525d9aa25d28b995cbf 100644 (file)
@@ -409,6 +409,7 @@ void wxApp::OSXOnWillFinishLaunching()
 void wxApp::OSXOnDidFinishLaunching()
 {
     wxTheApp->OnLaunched();
+    wxEventLoopBase::SetActive(GetMainLoop());
 }
 
 void wxApp::OSXOnWillTerminate()
@@ -417,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();
 }