[gtk/matthiasc/for-master: 2/2] main: Avoid a warning



commit f07d304f196267bec8a57615c98ccad46aedb3cf
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jun 26 08:19:32 2020 -0400

    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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]