X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6773ae198f4ff542231d85b4df7283af143d82eb..2de8030dbe61287fb398057d61dd22fe45078c1d:/src/gtk/threadgui.inc diff --git a/src/gtk/threadgui.inc b/src/gtk/threadgui.inc index 46073d4e0b..1717b172f6 100644 --- a/src/gtk/threadgui.inc +++ b/src/gtk/threadgui.inc @@ -35,16 +35,22 @@ static void ThreadExitProc(gpointer WXUNUSED(client), gint fid, GdkInputCondition WXUNUSED(cond)) { - wxThread* ptr; - - if (fid != p_thrd_pipe[0]) - return; - if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) { - //fprintf(stderr, "calling OnExit %p\n", ptr); - ptr->OnExit(); - } else { - //fprintf(stderr, "this should never happen\n"); - } + wxThread* ptr; + + // printf( "thread exit proc.\n" ); + + if (fid != p_thrd_pipe[0]) + return; + + if (read(fid, &ptr, sizeof(ptr)) == sizeof(ptr)) + { + // printf( "calling OnExit %p\n", ptr); + ptr->OnExit(); + } + else + { + // printf( "this should never happen\n" ); + } } // Global initialization @@ -63,28 +69,12 @@ static void wxThreadGuiExit() close(p_thrd_pipe[1]); } -#ifdef NO_DEFINE_GDK_1_1 - void wxMutexGuiEnter() { - gdk_mutex_enter(); + gs_mutexGui->Lock(); } void wxMutexGuiLeave() { - gdk_mutex_leave(); -} - -#else - -void wxMutexGuiEnter() -{ - wxMainMutex->Lock(); + gs_mutexGui->Unlock(); } - -void wxMutexGuiLeave() -{ - wxMainMutex->Unlock(); -} - -#endif