]> git.saurik.com Git - wxWidgets.git/commitdiff
remove old thread debugging code
authorPaul Cornett <paulcor@bullseye.com>
Thu, 20 Dec 2007 06:25:12 +0000 (06:25 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 20 Dec 2007 06:25:12 +0000 (06:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/app.cpp
src/gtk/window.cpp

index a8671dbf3dd391c41741ce886262d3fe92ab4e41..138f2eac56d6fb0bace87a7def1709c80f6acd92 100644 (file)
@@ -48,8 +48,6 @@
 // global data
 //-----------------------------------------------------------------------------
 
-bool   g_mainThreadLocked = false;
-
 static GtkWidget *gs_RootWindow = (GtkWidget*) NULL;
 
 //-----------------------------------------------------------------------------
@@ -218,25 +216,6 @@ bool wxApp::DoIdle()
     return false;
 }
 
-#if wxUSE_THREADS
-
-static GPollFunc wxgs_poll_func;
-
-extern "C" {
-static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
-{
-    g_mainThreadLocked = true;
-
-    gint res = (*wxgs_poll_func)(ufds, nfds, timeout);
-
-    g_mainThreadLocked = false;
-
-    return res;
-}
-}
-
-#endif // wxUSE_THREADS
-
 //-----------------------------------------------------------------------------
 // Access to the root window global
 //-----------------------------------------------------------------------------
@@ -354,9 +333,6 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
         g_thread_init(NULL);
         gdk_threads_init();
     }
-
-    wxgs_poll_func = g_main_context_get_poll_func(NULL);
-    g_main_context_set_poll_func(NULL, wxapp_poll_func);
 #endif // wxUSE_THREADS
 
     // We should have the wxUSE_WCHAR_T test on the _outside_
index 53bf0da0d8d6bd52cfc6a67307c4d09281a46550..dc9ed38fe47e4d5a4b09c64ce714cebc3c779975 100644 (file)
 #include "wx/fontutil.h"
 #include "wx/sysopt.h"
 
-#ifdef __WXDEBUG__
-    #include "wx/thread.h"
-#endif
-
 #include <ctype.h>
 
 #include "wx/gtk/private.h"
@@ -205,23 +201,10 @@ wxWindowGTK *g_delayedFocus = (wxWindowGTK*) NULL;
 GdkEvent    *g_lastMouseEvent = (GdkEvent*) NULL;
 int          g_lastButtonNumber = 0;
 
-extern bool g_mainThreadLocked;
-
 //-----------------------------------------------------------------------------
 // debug
 //-----------------------------------------------------------------------------
 
-#ifdef __WXDEBUG__
-
-#if wxUSE_THREADS
-#   define DEBUG_MAIN_THREAD if (wxThread::IsMain() && g_mainThreadLocked) printf("gui reentrance");
-#else
-#   define DEBUG_MAIN_THREAD
-#endif
-#else
-#define DEBUG_MAIN_THREAD
-#endif // Debug
-
 // the trace mask used for the focus debugging messages
 #define TRACE_FOCUS _T("focus")
 
@@ -336,8 +319,6 @@ gtk_window_expose_callback( GtkWidget*,
                             GdkEventExpose *gdk_event,
                             wxWindow *win )
 {
-    DEBUG_MAIN_THREAD
-
 #if 0
     if (win->GetName())
     {
@@ -894,8 +875,6 @@ gtk_window_key_press_callback( GtkWidget *widget,
                                GdkEventKey *gdk_event,
                                wxWindow *win )
 {
-    DEBUG_MAIN_THREAD
-
     if (!win->m_hasVMT)
         return FALSE;
     if (g_blockEventsOnDrag)
@@ -1108,8 +1087,6 @@ gtk_window_key_release_callback( GtkWidget * WXUNUSED(widget),
                                  GdkEventKey *gdk_event,
                                  wxWindowGTK *win )
 {
-    DEBUG_MAIN_THREAD
-
     if (!win->m_hasVMT)
         return FALSE;
 
@@ -1277,8 +1254,6 @@ bool wxWindowGTK::GTKProcessEvent(wxEvent& event) const
 
 int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny *event) const
 {
-    DEBUG_MAIN_THREAD
-
     if (!m_hasVMT)
         return FALSE;
     if (g_blockEventsOnDrag)
@@ -1633,8 +1608,6 @@ gtk_window_motion_notify_callback( GtkWidget * WXUNUSED(widget),
 static gboolean
 window_scroll_event(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win)
 {
-    DEBUG_MAIN_THREAD
-
     if (gdk_event->direction != GDK_SCROLL_UP &&
         gdk_event->direction != GDK_SCROLL_DOWN)
     {
@@ -1675,8 +1648,6 @@ gtk_window_focus_in_callback( GtkWidget * WXUNUSED(widget),
                               GdkEventFocus *WXUNUSED(event),
                               wxWindow *win )
 {
-    DEBUG_MAIN_THREAD
-
     if (win->m_imData)
         gtk_im_context_focus_in(win->m_imData->context);
 
@@ -1725,8 +1696,6 @@ gtk_window_focus_out_callback( GtkWidget * WXUNUSED(widget),
                                GdkEventFocus * WXUNUSED(gdk_event),
                                wxWindowGTK *win )
 {
-    DEBUG_MAIN_THREAD
-
     if (win->m_imData)
         gtk_im_context_focus_out(win->m_imData->context);
 
@@ -1889,8 +1858,6 @@ gtk_scrollbar_value_changed(GtkRange* range, wxWindow* win)
 static gboolean
 gtk_scrollbar_button_press_event(GtkRange*, GdkEventButton*, wxWindow* win)
 {
-    DEBUG_MAIN_THREAD
-
     g_blockEventsOnScroll = true;
     win->m_mouseButtonDown = true;
 
@@ -1924,8 +1891,6 @@ gtk_scrollbar_event_after(GtkRange* range, GdkEvent* event, wxWindow* win)
 static gboolean
 gtk_scrollbar_button_release_event(GtkRange* range, GdkEventButton*, wxWindow* win)
 {
-    DEBUG_MAIN_THREAD
-
     g_blockEventsOnScroll = false;
     win->m_mouseButtonDown = false;
     // If thumb tracking
@@ -1948,8 +1913,6 @@ gtk_scrollbar_button_release_event(GtkRange* range, GdkEventButton*, wxWindow* w
 static void
 gtk_window_realized_callback(GtkWidget* widget, wxWindow* win)
 {
-    DEBUG_MAIN_THREAD
-
     if (win->m_imData)
     {
         gtk_im_context_set_client_window( win->m_imData->context,
@@ -4117,8 +4080,6 @@ static inline bool IsScrollIncrement(double increment, double x)
 
 wxEventType wxWindowGTK::GetScrollEventType(GtkRange* range)
 {
-    DEBUG_MAIN_THREAD
-
     wxASSERT(range == m_scrollBar[0] || range == m_scrollBar[1]);
 
     const int barIndex = range == m_scrollBar[1];