summaryrefslogtreecommitdiff
path: root/gtk/gtkwidget.c
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@daimi.au.dk>2002-10-13 15:42:28 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2002-10-13 15:42:28 +0000
commit7fe315b58d537e33eeda68b163771aed94699488 (patch)
treed9dba4aa5ce734b9b1cdb0afc9c31f0e5989cb4d /gtk/gtkwidget.c
parentc7346aa2f58b15be61144c903cbbb50e9de4d93b (diff)
downloadgdk-pixbuf-7fe315b58d537e33eeda68b163771aed94699488.tar.gz
Don't invalidate a widget if it or one of its ancestors isn't mapped.
Sun Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate a widget if it or one of its ancestors isn't mapped.
Diffstat (limited to 'gtk/gtkwidget.c')
-rw-r--r--gtk/gtkwidget.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 418ee4d32..4be918835 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2051,11 +2051,17 @@ gtk_widget_queue_clear_area (GtkWidget *widget,
gint height)
{
GdkRectangle invalid_rect;
+ GtkWidget *w;
g_return_if_fail (GTK_IS_WIDGET (widget));
- if (!(widget->window && gdk_window_is_viewable (widget->window)))
+ if (!GTK_WIDGET_REALIZED (widget))
return;
+
+ /* Just return if the widget or one of its ancestors isn't mapped */
+ for (w = widget; w != NULL; w = w->parent)
+ if (!GTK_WIDGET_MAPPED (w))
+ return;
/* Find the correct widget */