extern bool g_isIdle;
+bool g_mainThreadLocked = FALSE;
+
//-----------------------------------------------------------------------------
// local functions
//-----------------------------------------------------------------------------
// unblock other threads wishing to do some GUI things
wxMutexGuiLeave();
+
+ g_mainThreadLocked = TRUE;
// wake up other threads
wxUsleep( 1 );
// block other thread again
wxMutexGuiEnter();
+ g_mainThreadLocked = FALSE;
+
wxapp_install_thread_wakeup();
// release lock again