]> git.saurik.com Git - wxWidgets.git/commitdiff
Added method to disable focus_out handling temporarily
authorRobert Roebling <robert@roebling.de>
Mon, 27 Oct 2008 14:02:54 +0000 (14:02 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 27 Oct 2008 14:02:54 +0000 (14:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/window.h
src/gtk/window.cpp

index 33a190824b2eb81df64727e47e5b65b3edf60134..fffe0778da38f9bddda2f4c192202b5c11b8eaa7 100644 (file)
@@ -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;
 
index 6b59396545854b472938a2d081802b7ec654364e..30c48b9e70a8a726aa1278ff3396ffa678d35941 100644 (file)
@@ -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()
 {