Commit 8a83f0c2 authored by Benjamin Otte's avatar Benjamin Otte

widget: Print a g_warning() when a cairo_t is invalid

Only print the warning on internal code, so we aren't too verbose.
parent d1c92c38
......@@ -5724,6 +5724,19 @@ _gtk_widget_draw_internal (GtkWidget *widget,
g_signal_emit (widget, widget_signals[DRAW],
0, cr,
if (cairo_status (cr) &&
_gtk_cairo_get_event (cr))
/* We check the event so we only warn about internal GTK calls.
* Errors might come from PDF streams having write failures and
* we don't want to spam stderr in that case.
* We do want to catch errors from
g_warning ("drawing failure for widget `%s': %s",
cairo_status_to_string (cairo_status (cr)));
context = gtk_widget_get_style_context (widget);
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