From 7d0e534969a78c92be7120c1412e573e6119e9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 4 Dec 2016 12:48:50 +0100 Subject: [PATCH] gtkmain: Correctly notify all widgets of a grab --- gtk/gtkmain.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index ba7b3c6303..ab233dcf69 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -2073,8 +2073,17 @@ gtk_grab_notify_foreach (GtkWidget *child, g_object_ref (child); - if ((was_shadowed || is_shadowed) && GTK_IS_CONTAINER (child)) - gtk_container_forall (GTK_CONTAINER (child), gtk_grab_notify_foreach, info); + if (was_shadowed || is_shadowed) + { + GtkWidget *p; + + for (p = _gtk_widget_get_first_child (child); + p != NULL; + p = _gtk_widget_get_next_sibling (p)) + { + gtk_grab_notify_foreach (p, info); + } + } if (info->device && _gtk_widget_get_device_window (child, info->device))