+//-----------------------------------------------------------------------------
+// debug
+//-----------------------------------------------------------------------------
+
+#ifdef __WXDEBUG__
+
+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") );
+
+ return FALSE;
+}
+
+void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar *window )
+{
+ wxString tmp = name;
+ tmp += _T(" FROM ");
+ tmp += window;
+
+ wxChar *s = new wxChar[tmp.Length()+1];
+
+ wxStrcpy( s, tmp );
+
+ gtk_signal_connect( GTK_OBJECT(widget), "focus_in_event",
+ GTK_SIGNAL_FUNC(gtk_debug_focus_in_callback), (gpointer)s );
+}
+
+#endif
+