[gtk/wip/chergert/fix-delayed-focus] window: clear move_focus when focus is already set
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/fix-delayed-focus] window: clear move_focus when focus is already set
- Date: Thu, 10 Jun 2021 21:02:23 +0000 (UTC)
commit a4c5d1d94dea025df4736b19197959a0e82f8113
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 10 14:01:41 2021 -0700
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.
gtk/gtkwindow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 35ca93a481..a79e160582 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]