+
+ g_isIdle = FALSE;
+}
+
+#if wxUSE_THREADS
+static gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) )
+{
+ gtk_timeout_remove( wxTheApp->m_wakeUpTimerTag );
+ wxTheApp->m_wakeUpTimerTag = 0;
+
+#if (GTK_MINOR_VERSION > 0)
+ /* when getting called from GDK's time-out handler
+ we are no longer within GDK's grab on the GUI
+ thread so we must lock it here ourselves */
+ GDK_THREADS_ENTER ();
+#endif
+
+ /* unblock other threads wishing to do some GUI things */
+ wxMutexGuiLeave();
+
+ /* wake up other threads */
+ wxUsleep( 1 );
+
+ /* block other thread again */
+ wxMutexGuiEnter();
+
+#if (GTK_MINOR_VERSION > 0)
+ /* release lock again */
+ GDK_THREADS_LEAVE ();
+#endif
+
+ wxTheApp->m_wakeUpTimerTag = gtk_timeout_add( 20, wxapp_wakeup_timerout_callback, (gpointer) NULL );
+