forked from AuroraMiddleware/gtk
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. See https://bugzilla.gnome.org/show_bug.cgi?id=765410
This commit is contained in:
parent
d36f866b27
commit
f168de3ada
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user