]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/app.cpp
Committing in .
[wxWidgets.git] / src / gtk / app.cpp
index 1bf855421b6b23cfeb3d90ea707a3168b2fadaa3..a7b0428703c90edab79b8ac3a52a40e409df7f98 100644 (file)
@@ -76,9 +76,6 @@
 // global data
 //-----------------------------------------------------------------------------
 
-wxApp *wxTheApp = (wxApp *)  NULL;
-wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL;
-
 bool   g_mainThreadLocked = FALSE;
 gint   g_pendingTag = 0;
 
@@ -92,15 +89,6 @@ extern bool g_isIdle;
 
 void wxapp_install_idle_handler();
 
-//-----------------------------------------------------------------------------
-// wxExit
-//-----------------------------------------------------------------------------
-
-void wxExit()
-{
-    gtk_main_quit();
-}
-
 //-----------------------------------------------------------------------------
 // wxYield
 //-----------------------------------------------------------------------------
@@ -168,20 +156,15 @@ bool wxApp::Yield(bool onlyIfNeeded)
 // wxWakeUpIdle
 //-----------------------------------------------------------------------------
 
-static bool gs_WakeUpIdle = false;
-
-void wxWakeUpIdle()
+void wxApp::WakeUpIdle()
 {
 #if wxUSE_THREADS
     if (!wxThread::IsMain())
         wxMutexGuiEnter();
 #endif
 
-    if (g_isIdle) {
-        gs_WakeUpIdle = true;
+    if (g_isIdle)
         wxapp_install_idle_handler();
-        gs_WakeUpIdle = false;
-    }
 
 #if wxUSE_THREADS
     if (!wxThread::IsMain())
@@ -660,6 +643,13 @@ int wxApp::MainLoop()
     return 0;
 }
 
+void wxApp::Exit()
+{
+    // VZ: no idea why is it different from ExitMainLoop() but this is what
+    //     wxExit() used to do
+    gtk_main_quit();
+}
+
 void wxApp::ExitMainLoop()
 {
     if (gtk_main_level() > 0)