[gtk+/wip/simple-draw2: 11/15] gtkcontainer: Don't propagate draws to	non-drawable widgets
- From: Alexander Larsson <alexl src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+/wip/simple-draw2: 11/15] gtkcontainer: Don't propagate draws to	non-drawable widgets
 
- Date: Wed, 24 Apr 2013 21:09:31 +0000 (UTC)
 
commit b47f774b74808abe805b373310f9bc40544a555d
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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index b546905..5414967 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -3374,6 +3374,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]