From 36a845fe5b6933de913a155ccb2512684b9f2379 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 27 Oct 2008 14:02:54 +0000 Subject: [PATCH] Added method to disable focus_out handling temporarily git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/window.h | 3 +++ src/gtk/window.cpp | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 33a1908..fffe077 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -256,6 +256,9 @@ public: // this widget will be queried for GTK's focus events GtkWidget *m_focusWidget; + + void GTKDisableFocusOutEvent(); + void GTKEnableFocusOutEvent(); wxGtkIMData *m_imData; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 6b59396..30c48b9 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2858,6 +2858,17 @@ void wxWindowGTK::GetTextExtent( const wxString& string, g_object_unref (layout); } +void wxWindowGTK::GTKDisableFocusOutEvent() +{ + g_signal_handlers_block_by_func( m_focusWidget, + (gpointer) gtk_window_focus_out_callback, this); +} + +void wxWindowGTK::GTKEnableFocusOutEvent() +{ + g_signal_handlers_unblock_by_func( m_focusWidget, + (gpointer) gtk_window_focus_out_callback, this); +} bool wxWindowGTK::GTKHandleFocusIn() { -- 2.7.4