From a752b8c4e028fb42f20625d9017b8685ed863924 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 14 Oct 2004 23:46:08 +0000 Subject: [PATCH] always let GTK process focus_out events itself git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 10 +++++----- src/gtk1/window.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 128d508e71..41a21c2a14 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 128d508e71..41a21c2a14 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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; -- 2.45.2