Avoid setting "pending" focus to a window which already has the focus.

This commit is contained in:
Paul Cornett
2018-07-26 09:21:03 -07:00
parent 1345b38c51
commit 3ec4e53aa1

View File

@@ -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;