Merge branch '1480-critical-csd-close-button' into 'master'

gtkmain: Avoid critical messages on closing window

Closes #1480

See merge request GNOME/gtk!442
This commit is contained in:
Emmanuele Bassi 2019-01-30 11:53:12 +00:00
commit a7fa1cf6f2

View File

@ -2444,9 +2444,11 @@ propagate_event_up (GtkWidget *widget,
*/
if (!gtk_widget_is_sensitive (widget))
handled_event = event->any.type != GDK_SCROLL;
else
else if (gtk_widget_get_realized (widget))
handled_event = gtk_widget_event (widget, event);
handled_event |= !gtk_widget_get_realized (widget);
tmp = gtk_widget_get_parent (widget);
g_object_unref (widget);
@ -2498,8 +2500,10 @@ propagate_event_down (GtkWidget *widget,
else
handled_event = TRUE;
}
else
else if (gtk_widget_get_realized (widget))
handled_event = _gtk_widget_captured_event (widget, event);
handled_event |= !gtk_widget_get_realized (widget);
}
g_list_free_full (widgets, (GDestroyNotify)g_object_unref);