diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-10-08 23:06:07 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-10-14 15:05:46 -0400 |
commit | 9b26660095a9d8776418847e3c83ffaca4ef1a4d (patch) | |
tree | 2dea9bf6de4e92672b4333222db500558ba74b0a /gtk/gtkmain.c | |
parent | 8dce92e82b82dec47abc9a5e5e7a07fc704e4cf3 (diff) | |
download | gtk+-9b26660095a9d8776418847e3c83ffaca4ef1a4d.tar.gz |
Send focus events to the root
We are not propagating focus change events, and that is the only
place where we are listening for focus change events. If GtkWindow
does not see focus-in events for its popovers, we end up with
inadvertendly inactive windows.
Fixes: #3240
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r-- | gtk/gtkmain.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 10780b7684..bffb4cfa94 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1648,8 +1648,11 @@ gtk_main_do_event (GdkEvent *event) break; case GDK_FOCUS_CHANGE: - if (!_gtk_widget_captured_event (target_widget, event, target_widget)) - gtk_widget_event (target_widget, event, target_widget); + { + GtkWidget *root = GTK_WIDGET (gtk_widget_get_root (target_widget)); + if (!_gtk_widget_captured_event (root, event, root)) + gtk_widget_event (root, event, root); + } break; case GDK_KEY_PRESS: |