From b0f3aa82b7759bb9a84d8f354846b8020ed0f989 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 11 Nov 2012 19:30:11 +0100 Subject: bin: Only handle size for the child if it is visible --- gtk/gtkbin.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gtk/gtkbin.c') diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c index e17d2be794..11b46f4678 100644 --- a/gtk/gtkbin.c +++ b/gtk/gtkbin.c @@ -189,7 +189,7 @@ gtk_bin_get_preferred_width (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_width (priv->child, @@ -207,7 +207,7 @@ gtk_bin_get_preferred_height (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_height (priv->child, @@ -226,7 +226,7 @@ gtk_bin_get_preferred_width_for_height (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_width_for_height (priv->child, height, @@ -248,7 +248,7 @@ gtk_bin_get_preferred_height_for_width (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkBinPrivate *priv = bin->priv; - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) { gint child_min, child_nat; gtk_widget_get_preferred_height_for_width (priv->child, width, @@ -270,7 +270,7 @@ gtk_bin_size_allocate (GtkWidget *widget, gtk_widget_set_allocation (widget, allocation); - if (priv->child) + if (priv->child && gtk_widget_get_visible (priv->child)) gtk_widget_size_allocate (priv->child, allocation); } -- cgit v1.2.1