g_return_if_fail (GTK_IS_WIDGET (widget));
+ if (!priv->visible)
+ {
+ g_print ("woot, invisible widget allocated!\n");
+ return;
+ }
+
gtk_widget_push_verify_invariants (widget);
#ifdef G_ENABLE_DEBUG
_gtk_widget_set_visible_flag (GtkWidget *widget,
gboolean visible)
{
- widget->priv->visible = visible;
+ GtkWidgetPrivate *priv = widget->priv;
+
+ priv->visible = visible;
+
+ if (!visible)
+ {
+ priv->allocation.x = -1;
+ priv->allocation.y = -1;
+ priv->allocation.width = 1;
+ priv->allocation.height = 1;
+ }
}
/**
GtkWidgetPrivate *priv;
g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_if_fail (gtk_widget_get_visible (widget));
g_return_if_fail (allocation != NULL);
priv = widget->priv;