From 067f418604c562cb53988c1532ec7deb92dbc84e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Mon, 16 Aug 2010 00:34:48 +0200 Subject: [PATCH] tests/testcairo.c: Use accessor functions to access GtkWidget --- tests/testcairo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/testcairo.c b/tests/testcairo.c index b2a232b02..dc3a27cfc 100644 --- a/tests/testcairo.c +++ b/tests/testcairo.c @@ -195,11 +195,13 @@ on_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data) { + GtkAllocation allocation; 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); -- 2.43.2