X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/75ed1d15d0d866cac78f7c0da176db8dd5288bc8..9390a202a8b9d67d393faf3e1323885e6a27c127:/src/gtk1/threadgui.inc?ds=sidebyside diff --git a/src/gtk1/threadgui.inc b/src/gtk1/threadgui.inc index baa8fe8b76..1717b172f6 100644 --- a/src/gtk1/threadgui.inc +++ b/src/gtk1/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