From 3ec4e53aa1845cbf2fee977f65fc8dd931822c89 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 26 Jul 2018 09:21:03 -0700 Subject: [PATCH] Avoid setting "pending" focus to a window which already has the focus. --- src/gtk/window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;