From f07d304f196267bec8a57615c98ccad46aedb3cf Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 26 Jun 2020 08:19:32 -0400 Subject: [PATCH] main: Avoid a warning transient-for relationships only exist between windows, so check that both candidates are such. Fixes: #2894 --- gtk/gtkmain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 9f845a4866..57cacc2273 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1753,6 +1753,7 @@ gtk_main_do_event (GdkEvent *event) ((gtk_widget_is_sensitive (target_widget) || gdk_event_get_event_type (event) == GDK_SCROLL) && gtk_widget_is_ancestor (target_widget, grab_widget)) || (GTK_IS_WINDOW (grab_widget) && + GTK_IS_WINDOW (event_widget) && grab_widget != event_widget && is_transient_for (GTK_WINDOW (event_widget), GTK_WINDOW (grab_widget)))) grab_widget = target_widget;