[gtk+] widget: Only warn about missing allocation if G_ENABLE_DEBUG
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: Only warn about missing allocation if G_ENABLE_DEBUG
- Date: Wed, 14 Sep 2016 22:07:17 +0000 (UTC)
commit 5ea69a136bd7e4970b3a800390e20314665aaed2
Author: Timm Bäder <mail baedert org>
Date: Wed Sep 14 18:06:54 2016 -0400
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 4c1d798..017bbbe 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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]