From: Timm Bäder Date: Sat, 17 Mar 2018 12:14:25 +0000 (+0100) Subject: widget: Only print allocation warnings with --enable-debug X-Git-Tag: archive/raspbian/3.22.29-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8d6989d24aa9995ce76da4f64ff9a13a6143b08f;p=gtk%2B3.0.git 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 --- 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)) {