extern bool g_isIdle;
+bool g_mainThreadLocked = FALSE;
+
//-----------------------------------------------------------------------------
// local functions
//-----------------------------------------------------------------------------
{
#if wxUSE_THREADS
if (!wxThread::IsMain())
- gdk_threads_enter();
+ wxMutexGuiEnter();
#endif
if (g_isIdle)
#if wxUSE_THREADS
if (!wxThread::IsMain())
- gdk_threads_leave();
+ wxMutexGuiLeave();
#endif
}
// 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();
wxapp_uninstall_thread_wakeup();
// 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
wxPendingEventsLocker = new wxCriticalSection();
#endif
-/*
- wxTheFontNameDirectory = new wxFontNameDirectory;
- wxTheFontNameDirectory->Initialize();
-*/
-
wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
wxTheColourDatabase->Initialize();
wxInitializeStockLists();
wxInitializeStockObjects();
+#if wxUSE_WX_RESOURCES
+ wxInitializeResourceSystem();
+#endif
+
wxModule::RegisterModules();
if (!wxModule::InitializeModules()) return FALSE;
{
wxModule::CleanUpModules();
+#if wxUSE_WX_RESOURCES
+ wxCleanUpResourceSystem();
+#endif
+
if (wxTheColourDatabase)
delete wxTheColourDatabase;
+
wxTheColourDatabase = (wxColourDatabase*) NULL;
-/*
- if (wxTheFontNameDirectory) delete wxTheFontNameDirectory;
- wxTheFontNameDirectory = (wxFontNameDirectory*) NULL;
-*/
-
wxDeleteStockObjects();
wxDeleteStockLists();