remove old thread debugging code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-12-20 06:25:12 +00:00
parent ef94049fb7
commit 24377c4681
2 changed files with 0 additions and 63 deletions

View File

@@ -48,8 +48,6 @@
// global data // global data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool g_mainThreadLocked = false;
static GtkWidget *gs_RootWindow = (GtkWidget*) NULL; static GtkWidget *gs_RootWindow = (GtkWidget*) NULL;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -218,25 +216,6 @@ bool wxApp::DoIdle()
return false; 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 // Access to the root window global
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -354,9 +333,6 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
g_thread_init(NULL); g_thread_init(NULL);
gdk_threads_init(); 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 #endif // wxUSE_THREADS
// We should have the wxUSE_WCHAR_T test on the _outside_ // We should have the wxUSE_WCHAR_T test on the _outside_

View File

@@ -33,10 +33,6 @@
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/sysopt.h" #include "wx/sysopt.h"
#ifdef __WXDEBUG__
#include "wx/thread.h"
#endif
#include <ctype.h> #include <ctype.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
@@ -205,23 +201,10 @@ wxWindowGTK *g_delayedFocus = (wxWindowGTK*) NULL;
GdkEvent *g_lastMouseEvent = (GdkEvent*) NULL; GdkEvent *g_lastMouseEvent = (GdkEvent*) NULL;
int g_lastButtonNumber = 0; int g_lastButtonNumber = 0;
extern bool g_mainThreadLocked;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// debug // 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 // the trace mask used for the focus debugging messages
#define TRACE_FOCUS _T("focus") #define TRACE_FOCUS _T("focus")
@@ -336,8 +319,6 @@ gtk_window_expose_callback( GtkWidget*,
GdkEventExpose *gdk_event, GdkEventExpose *gdk_event,
wxWindow *win ) wxWindow *win )
{ {
DEBUG_MAIN_THREAD
#if 0 #if 0
if (win->GetName()) if (win->GetName())
{ {
@@ -894,8 +875,6 @@ gtk_window_key_press_callback( GtkWidget *widget,
GdkEventKey *gdk_event, GdkEventKey *gdk_event,
wxWindow *win ) wxWindow *win )
{ {
DEBUG_MAIN_THREAD
if (!win->m_hasVMT) if (!win->m_hasVMT)
return FALSE; return FALSE;
if (g_blockEventsOnDrag) if (g_blockEventsOnDrag)
@@ -1108,8 +1087,6 @@ gtk_window_key_release_callback( GtkWidget * WXUNUSED(widget),
GdkEventKey *gdk_event, GdkEventKey *gdk_event,
wxWindowGTK *win ) wxWindowGTK *win )
{ {
DEBUG_MAIN_THREAD
if (!win->m_hasVMT) if (!win->m_hasVMT)
return FALSE; return FALSE;
@@ -1277,8 +1254,6 @@ bool wxWindowGTK::GTKProcessEvent(wxEvent& event) const
int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny *event) const int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny *event) const
{ {
DEBUG_MAIN_THREAD
if (!m_hasVMT) if (!m_hasVMT)
return FALSE; return FALSE;
if (g_blockEventsOnDrag) if (g_blockEventsOnDrag)
@@ -1633,8 +1608,6 @@ gtk_window_motion_notify_callback( GtkWidget * WXUNUSED(widget),
static gboolean static gboolean
window_scroll_event(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win) window_scroll_event(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win)
{ {
DEBUG_MAIN_THREAD
if (gdk_event->direction != GDK_SCROLL_UP && if (gdk_event->direction != GDK_SCROLL_UP &&
gdk_event->direction != GDK_SCROLL_DOWN) gdk_event->direction != GDK_SCROLL_DOWN)
{ {
@@ -1675,8 +1648,6 @@ gtk_window_focus_in_callback( GtkWidget * WXUNUSED(widget),
GdkEventFocus *WXUNUSED(event), GdkEventFocus *WXUNUSED(event),
wxWindow *win ) wxWindow *win )
{ {
DEBUG_MAIN_THREAD
if (win->m_imData) if (win->m_imData)
gtk_im_context_focus_in(win->m_imData->context); 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), GdkEventFocus * WXUNUSED(gdk_event),
wxWindowGTK *win ) wxWindowGTK *win )
{ {
DEBUG_MAIN_THREAD
if (win->m_imData) if (win->m_imData)
gtk_im_context_focus_out(win->m_imData->context); gtk_im_context_focus_out(win->m_imData->context);
@@ -1889,8 +1858,6 @@ gtk_scrollbar_value_changed(GtkRange* range, wxWindow* win)
static gboolean static gboolean
gtk_scrollbar_button_press_event(GtkRange*, GdkEventButton*, wxWindow* win) gtk_scrollbar_button_press_event(GtkRange*, GdkEventButton*, wxWindow* win)
{ {
DEBUG_MAIN_THREAD
g_blockEventsOnScroll = true; g_blockEventsOnScroll = true;
win->m_mouseButtonDown = true; win->m_mouseButtonDown = true;
@@ -1924,8 +1891,6 @@ gtk_scrollbar_event_after(GtkRange* range, GdkEvent* event, wxWindow* win)
static gboolean static gboolean
gtk_scrollbar_button_release_event(GtkRange* range, GdkEventButton*, wxWindow* win) gtk_scrollbar_button_release_event(GtkRange* range, GdkEventButton*, wxWindow* win)
{ {
DEBUG_MAIN_THREAD
g_blockEventsOnScroll = false; g_blockEventsOnScroll = false;
win->m_mouseButtonDown = false; win->m_mouseButtonDown = false;
// If thumb tracking // If thumb tracking
@@ -1948,8 +1913,6 @@ gtk_scrollbar_button_release_event(GtkRange* range, GdkEventButton*, wxWindow* w
static void static void
gtk_window_realized_callback(GtkWidget* widget, wxWindow* win) gtk_window_realized_callback(GtkWidget* widget, wxWindow* win)
{ {
DEBUG_MAIN_THREAD
if (win->m_imData) if (win->m_imData)
{ {
gtk_im_context_set_client_window( win->m_imData->context, 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) wxEventType wxWindowGTK::GetScrollEventType(GtkRange* range)
{ {
DEBUG_MAIN_THREAD
wxASSERT(range == m_scrollBar[0] || range == m_scrollBar[1]); wxASSERT(range == m_scrollBar[0] || range == m_scrollBar[1]);
const int barIndex = range == m_scrollBar[1]; const int barIndex = range == m_scrollBar[1];