tests/testcairo.c: Use accessor functions to access GtkWidget

This commit is contained in:
Javier Jardón
2010-08-16 00:34:48 +02:00
parent 40dbb2deb2
commit 067f418604

View File

@ -195,11 +195,13 @@ on_expose_event (GtkWidget *widget,
GdkEventExpose *event, GdkEventExpose *event,
gpointer data) gpointer data)
{ {
GtkAllocation allocation;
cairo_t *cr; cairo_t *cr;
cr = gdk_cairo_create (widget->window); cr = gdk_cairo_create (gtk_widget_get_window (widget));
draw (cr, widget->allocation.width, widget->allocation.height); gtk_widget_get_allocation (widget, &allocation);
draw (cr, allocation.width, allocation.height);
cairo_destroy (cr); cairo_destroy (cr);