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:
parent
ef94049fb7
commit
24377c4681
@ -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_
|
||||
|
@ -33,10 +33,6 @@
|
||||
#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];
|
||||
|
Loading…
Reference in New Issue
Block a user