]> git.saurik.com Git - wxWidgets.git/commitdiff
an (blind) attempt to fix wxGTK frame activation bug
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 5 Oct 2001 22:08:35 +0000 (22:08 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 5 Oct 2001 22:08:35 +0000 (22:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index ff368baf68f3c84530e71d48828a7d8aeaede77d..71c1df2f66e1bb4ec48b033569255c03b6519ed5 100644 (file)
@@ -1772,6 +1772,9 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;
 
+    wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, wxT("unfocusing window that haven't gained focus properly") )
+    g_activeFrameLostFocus = TRUE;
+
     // VZ: this is really weird but GTK+ seems to call us from inside
     //     gtk_widget_grab_focus(), i.e. it first sends "focus_out" signal to
     //     this widget and then "focus_in". This is totally unexpected and
@@ -1816,9 +1819,6 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
     }
 #endif // wxUSE_CARET
 
-    wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, wxT("unfocusing window that haven't gained focus properly") )
-    g_activeFrameLostFocus = TRUE;
-
     wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
     event.SetEventObject( win );
 
index ff368baf68f3c84530e71d48828a7d8aeaede77d..71c1df2f66e1bb4ec48b033569255c03b6519ed5 100644 (file)
@@ -1772,6 +1772,9 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;
 
+    wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, wxT("unfocusing window that haven't gained focus properly") )
+    g_activeFrameLostFocus = TRUE;
+
     // VZ: this is really weird but GTK+ seems to call us from inside
     //     gtk_widget_grab_focus(), i.e. it first sends "focus_out" signal to
     //     this widget and then "focus_in". This is totally unexpected and
@@ -1816,9 +1819,6 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
     }
 #endif // wxUSE_CARET
 
-    wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, wxT("unfocusing window that haven't gained focus properly") )
-    g_activeFrameLostFocus = TRUE;
-
     wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
     event.SetEventObject( win );