[gtk+/wip/simple-draw] gtkcontainer: Don't propagate draws to non-drawable widgets



commit 1270bcd5c3cd30791e78a09109400e0263cc66df
Author: Alexander Larsson <alexl redhat com>
Date:   Sun Apr 21 01:35:57 2013 +0200

    gtkcontainer: Don't propagate draws to non-drawable widgets
    
    This short-circuits the propagation a bit earlier and fixes
    a crash when looking for has_native_window on non-realized widgets.

 gtk/gtkcontainer.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 7c17d49..130061e 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -3324,6 +3324,9 @@ gtk_container_propagate_draw (GtkContainer   *container,
 
   g_assert (gtk_widget_get_parent (child) == GTK_WIDGET (container));
 
+  if (!gtk_widget_is_drawable (child))
+    return;
+
   event = _gtk_cairo_get_event (cr);
   if (event)
     {


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