[gtk/matthiasc/for-master: 9/10] Send focus events to the root
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 9/10] Send focus events to the root
- Date: Fri, 9 Oct 2020 11:53:15 +0000 (UTC)
commit 115ed005e615d5046c50e801f850c2490fe7b339
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 8 23:06:07 2020 -0400
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
gtk/gtkmain.c | 7 +++++--
1 file 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]