]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtksizerequest.c
filechooserbutton: Update the button's state only on programmatic changes to the...
[~andy/gtk] / gtk / gtksizerequest.c
index 7ad94398bb4aa88dc5fde0db7da2b00bcfcf3d68..0ce86bd66fc95b849c98347619791f28898604b8 100644 (file)
@@ -268,6 +268,15 @@ _gtk_widget_compute_size_for_orientation (GtkWidget        *widget,
   gpointer key;
   gint    min_result = 0, nat_result = 0;
 
+  if (!gtk_widget_get_visible (widget) && !gtk_widget_is_toplevel (widget))
+    {
+      if (minimum)
+        *minimum = 0;
+      if (natural)
+        *natural = 0;
+      return;
+    }
+
   if (G_LIKELY (!_gtk_widget_get_sizegroups (widget)))
     {
       gtk_widget_query_size_for_orientation (widget, orientation, for_size, minimum, natural);