X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5e6ed7cc841789a94d37965a8e5c1cc61abb87c..e07f9efa038396f0fe1a11c0dcbad6c7e5f61c3f:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index ff368baf68..71c1df2f66 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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 );