window: clear move_focus when focus is already set

This can get set in other places, so we need to ensure it is cleared so
that an after-paint handler does not move the focus to a new widget.
This commit is contained in:
Christian Hergert 2021-06-10 14:01:41 -07:00
parent 17f1bb1632
commit a4c5d1d94d

View File

@ -2024,7 +2024,10 @@ gtk_window_root_set_focus (GtkRoot *root,
return;
if (focus == priv->focus_widget)
return;
{
priv->move_focus = FALSE;
return;
}
if (priv->focus_widget)
old_focus = g_object_ref (priv->focus_widget);