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
This commit is contained in:
Matthias Clasen 2020-10-08 23:06:07 -04:00
parent 6a0704aeb4
commit 115ed005e6

View File

@ -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: