static void
create_surface (GtkWidget *widget)
{
- GtkAllocation allocation;
cairo_t *cr;
if (surface)
cairo_surface_destroy (surface);
- gtk_widget_get_allocation (widget, &allocation);
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
- allocation.width,
- allocation.height);
+ gtk_widget_get_width (widget),
+ gtk_widget_get_height (widget));
/* Initialize the surface to white */
cr = cairo_create (surface);
cairo_t *cr;
if (surface == NULL ||
- cairo_image_surface_get_width (surface) != gtk_widget_get_allocated_width (widget) ||
- cairo_image_surface_get_height (surface) != gtk_widget_get_allocated_height (widget))
+ cairo_image_surface_get_width (surface) != gtk_widget_get_width (widget) ||
+ cairo_image_surface_get_height (surface) != gtk_widget_get_height (widget))
create_surface (widget);
update_rect.x = x - 3;