From 5ea69a136bd7e4970b3a800390e20314665aaed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 14 Sep 2016 18:06:54 -0400 Subject: [PATCH] widget: Only warn about missing allocation if G_ENABLE_DEBUG Not all occurrences of this warning can be fixed today, so put it behind a G_ENABLE_DEBUG flag since it still shows legitimate problems even if some of them are false positives. --- gtk/gtkwidget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 4c1d798e26..017bbbed53 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -6998,8 +6998,10 @@ gtk_widget_draw_internal (GtkWidget *widget, if (push_group) cairo_push_group (cr); +#ifdef G_ENABLE_DEBUG if (_gtk_widget_get_alloc_needed (widget)) g_warning ("%s %p is drawn without a current allocation. This should not happen.", G_OBJECT_TYPE_NAME (widget), widget); +#endif if (g_signal_has_handler_pending (widget, widget_signals[DRAW], 0, FALSE)) {