drawingarea: checks parent's draw() before call it

commit 6786c9d7 introduced a bug when a drawing area is used for
rendering videos, since GtkWidgetClass doesn't set a draw()
method by itself.

https://bugzilla.gnome.org/show_bug.cgi?id=751877
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-07-03 09:54:34 +02:00 committed by Emmanuele Bassi
parent 28e1ed4f2a
commit b3166b745f

View File

@ -219,7 +219,10 @@ gtk_drawing_area_draw (GtkWidget *widget,
gtk_widget_get_allocated_width (widget),
gtk_widget_get_allocated_height (widget));
return GTK_WIDGET_CLASS (gtk_drawing_area_parent_class)->draw (widget, cr);
if (GTK_WIDGET_CLASS (gtk_drawing_area_parent_class)->draw)
return GTK_WIDGET_CLASS (gtk_drawing_area_parent_class)->draw (widget, cr);
return FALSE;
}
static void