X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a0c68a70be35dcf42e9ff1d43f0a4e444cf8e50..b853f8981fc8b59f9824b27e4c96e99eda6735dd:/src/gtk/app.cpp?ds=sidebyside diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index ba0fd8ed6b..c0004485a6 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -49,6 +49,8 @@ wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NUL extern bool g_isIdle; +bool g_mainThreadLocked = FALSE; + //----------------------------------------------------------------------------- // local functions //----------------------------------------------------------------------------- @@ -200,6 +202,8 @@ gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) ) // unblock other threads wishing to do some GUI things wxMutexGuiLeave(); + + g_mainThreadLocked = TRUE; // wake up other threads wxUsleep( 1 ); @@ -207,6 +211,8 @@ gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) ) // block other thread again wxMutexGuiEnter(); + g_mainThreadLocked = FALSE; + wxapp_install_thread_wakeup(); // release lock again