[gtk+/wip/baedert/children: 361/365] gtkmain: Correctly notify all widgets of a grab



commit f97840cd2d517ae2d53f60490bf0ed2505ad6525
Author: Timm Bäder <mail baedert org>
Date:   Sun Dec 4 12:48:50 2016 +0100

    gtkmain: Correctly notify all widgets of a grab

 gtk/gtkmain.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index ba7b3c6..ab233dc 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))


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