diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index f03c85f08a..ee5fd3142d 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -131,9 +131,16 @@ static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), const wxChar *name ) { - wxPrintf( _T("FOCUS NOW AT: ") ); - wxPrintf( name ); - wxPrintf( _T("\n") ); + // to enable logging of the focus events replace 0 with 1 +#if 0 + static bool s_done = FALSE; + if ( !s_done ) + { + wxLog::AddTraceMask("focus"); + s_done = TRUE; + } +#endif + wxLogTrace(_T("FOCUS NOW AT: %s"), name); return FALSE; } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index f03c85f08a..ee5fd3142d 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -131,9 +131,16 @@ static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), const wxChar *name ) { - wxPrintf( _T("FOCUS NOW AT: ") ); - wxPrintf( name ); - wxPrintf( _T("\n") ); + // to enable logging of the focus events replace 0 with 1 +#if 0 + static bool s_done = FALSE; + if ( !s_done ) + { + wxLog::AddTraceMask("focus"); + s_done = TRUE; + } +#endif + wxLogTrace(_T("FOCUS NOW AT: %s"), name); return FALSE; }