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.24.39-1+rpi1~1^2~65^2~36^2~56 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eb01ba8573bec47e02c8fc4eaf10e2f7cff522dd;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. --- 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)) {