Commit f168de3a authored by Matthias Clasen's avatar Matthias Clasen

Add a warning for a broken situation

When we emit ::draw, the widget should not have alloc_needed set
anymore. If this happens, it indicates a broken situation. Add a
warning to help tracking down why this might occur.

parent d36f866b
......@@ -6973,6 +6973,9 @@ gtk_widget_draw_internal (GtkWidget *widget,
if (push_group)
cairo_push_group (cr);
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);
if (g_signal_has_handler_pending (widget, widget_signals[DRAW], 0, FALSE))
g_signal_emit (widget, widget_signals[DRAW],
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment