X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06fda9e808172d72700908b69cb775ed71b1d0d7..fa4a69423d193505c28dd0c0ceaceab296fa3bfa:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 4a3169a41d..41a21c2a14 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1983,7 +1983,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, { // not yet, notify it win->m_hasFocus = TRUE; - + if ( DoSendFocusEvents(win) ) { gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); @@ -2043,11 +2043,11 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEventFocus *gdk wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() ); event.SetEventObject( win ); - if (win->GetEventHandler()->ProcessEvent( event )) - { - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" ); - return TRUE; - } + // even if we did process the event in wx code, still let GTK itself + // process it too as otherwise bad things happen, especially in GTK2 + // where the text control simply aborts the program if it doesn't get + // the matching focus out event + (void)win->GetEventHandler()->ProcessEvent( event ); } return FALSE; @@ -2826,7 +2826,7 @@ void wxWindowGTK::PostCreation() { if (m_focusWidget == NULL) m_focusWidget = m_widget; - + gtk_signal_connect( GTK_OBJECT(m_focusWidget), "focus_in_event", GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );