[gtk+/wip/simple-draw3: 11/23] 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-draw3: 11/23] gtkcontainer: Don't propagate draws to non-drawable widgets
- Date: Mon, 29 Apr 2013 19:51:44 +0000 (UTC)
commit 1703c5a87a27973e0b17fcdca9a81379631bb166
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 f52db8c..ea04576 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]