From 8d6989d24aa9995ce76da4f64ff9a13a6143b08f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 17 Mar 2018 13:14:25 +0100 Subject: [PATCH] widget: Only print allocation warnings with --enable-debug i.e. if G_ENABLE_CONSISTENCY_CHECKS is defined. This makes sense, considering that this warning is about consistency of internal widget state. Origin: upstream, 3.22.30, commit:eb01ba8573bec47e02c8fc4eaf10e2f7cff522dd Gbp-Pq: Name 0012-widget-Only-print-allocation-warnings-with-enable-de.patch --- gtk/gtkwidget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 13421eab69..c910e43f7b 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -5981,12 +5981,14 @@ gtk_widget_size_allocate_with_baseline (GtkWidget *widget, gtk_widget_queue_draw (widget); } +#ifdef G_ENABLE_CONSISTENCY_CHECKS if (gtk_widget_get_resize_needed (widget)) { g_warning ("Allocating size to %s %p without calling gtk_widget_get_preferred_width/height(). " "How does the code know the size to allocate?", gtk_widget_get_name (widget), widget); } +#endif if (GTK_DEBUG_CHECK (GEOMETRY)) { -- 2.30.2