X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c351dad14431c3e1aeeef6b86f61ba898d1d9ad..e487524e492809638b7e335937c41fd432458a54:/src/gtk1/threadgui.inc diff --git a/src/gtk1/threadgui.inc b/src/gtk1/threadgui.inc index 8195b0ddbd..46073d4e0b 100644 --- a/src/gtk1/threadgui.inc +++ b/src/gtk1/threadgui.inc @@ -21,7 +21,6 @@ #include - ///////////////////////////////////////////////////////////////////////////// // Static variables ///////////////////////////////////////////////////////////////////////////// @@ -49,7 +48,7 @@ ThreadExitProc(gpointer WXUNUSED(client), gint fid, } // Global initialization -static void wxThreadGuiInit(void) +static void wxThreadGuiInit() { pipe(p_thrd_pipe); p_thrd_inid = gdk_input_add(p_thrd_pipe[0], GDK_INPUT_READ, @@ -57,9 +56,35 @@ static void wxThreadGuiInit(void) } // Global cleanup -static void wxThreadGuiExit(void) +static void wxThreadGuiExit() { gdk_input_remove(p_thrd_inid); close(p_thrd_pipe[0]); close(p_thrd_pipe[1]); } + +#ifdef NO_DEFINE_GDK_1_1 + +void wxMutexGuiEnter() +{ + gdk_mutex_enter(); +} + +void wxMutexGuiLeave() +{ + gdk_mutex_leave(); +} + +#else + +void wxMutexGuiEnter() +{ + wxMainMutex->Lock(); +} + +void wxMutexGuiLeave() +{ + wxMainMutex->Unlock(); +} + +#endif