widget: Always warn when underallocating widgets
authorTimm Bäder <mail@baedert.org>
Tue, 23 Feb 2016 09:34:16 +0000 (10:34 +0100)
committerTimm Bäder <mail@baedert.org>
Fri, 1 Apr 2016 08:04:25 +0000 (10:04 +0200)
gtk/gtkwidget.c

index 95b8e242bbc24e2a98d033f459c7b8300fe8af5f..2ff149869ee79285f8c4263ea66141682858277a 100644 (file)
@@ -6035,17 +6035,14 @@ gtk_widget_size_allocate_with_baseline (GtkWidget     *widget,
     }
 
 #ifdef G_ENABLE_DEBUG
-  if (GTK_DEBUG_CHECK (GEOMETRY))
-    {
-      if ((min_width > real_allocation.width || min_height > real_allocation.height) &&
-          !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,
-                   real_allocation.width, real_allocation.height,
-                   min_width, min_height);
-    }
+  if ((min_width > real_allocation.width || min_height > real_allocation.height) &&
+      !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,
+               real_allocation.width, real_allocation.height,
+               min_width, min_height);
 #endif
   /* Now that we have the right natural height and width, go ahead and remove any margins from the
    * allocated sizes and possibly limit them to the natural sizes */