widget: Remove a check
authorBenjamin Otte <otte@redhat.com>
Fri, 19 Nov 2021 23:44:47 +0000 (00:44 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 20 Nov 2021 05:04:10 +0000 (06:04 +0100)
That consistency check is entirely outdated and just prints confusing
stuff.

gtk/gtkwidget.c

index 65c62be6a07f728c11c9ff963898cf034db48e2d..192cc62de34bd26fdb466edf619a84a48a93d12a 100644 (file)
@@ -3876,18 +3876,6 @@ gtk_widget_adjust_size_allocation (GtkWidget     *widget,
                         &allocation->x,
                         &allocation->width);
     }
-
-#ifdef G_ENABLE_CONSISTENCY_CHECKS
-  if ((min_width > allocation->width + priv->margin.left + priv->margin.right ||
-       min_height > allocation->height + priv->margin.top + priv->margin.bottom) &&
-      !GTK_IS_SCROLLABLE (widget))
-    g_warning ("gtk_widget_size_allocate(): attempt to underallocate %s%s %s %p. "
-               "Allocation is %dx%d, but minimum required size is %dx%d.",
-               priv->parent ? G_OBJECT_TYPE_NAME (priv->parent) : "", priv->parent ? "'s child" : "toplevel",
-               G_OBJECT_TYPE_NAME (widget), widget,
-               allocation->width, allocation->height,
-               min_width, min_height);
-#endif
 }
 
 /**