Themes and threads testing code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user