diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 9f17f19ebe..99fc8eebfa 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -4518,7 +4518,9 @@ void wxWindowGTK::SetFocus() // Because we want to FindFocus() call immediately following // foo->SetFocus() to return foo, we have to keep track of "pending" focus // ourselves. - gs_pendingFocus = this; + gs_pendingFocus = NULL; + if (gs_currentFocus != this) + gs_pendingFocus = this; GtkWidget *widget = m_wxwindow ? m_wxwindow : m_focusWidget;