GtkAllocation *allocation)
{
EvLoadingWindow *window = EV_LOADING_WINDOW (widget);
-#if GTK_CHECK_VERSION (2, 90, 8)
cairo_surface_t *surface;
- cairo_region_t *shape;
-#else
- GdkPixmap *mask;
-#endif
+ cairo_region_t *shape;
cairo_t *cr;
double r;
window->width = allocation->width;
window->height = allocation->height;
-#if GTK_CHECK_VERSION (2, 90, 8)
surface = cairo_image_surface_create (CAIRO_FORMAT_A8,
window->width,
window->height);
cr = cairo_create (surface);
-#else
- mask = gdk_pixmap_new (NULL, window->width, window->height, 1);
- cr = gdk_cairo_create (GDK_DRAWABLE (mask));
-#endif
cairo_save (cr);
cairo_rectangle (cr, 0, 0, window->width, window->height);
cairo_destroy (cr);
-#if GTK_CHECK_VERSION (2, 90, 8)
shape = gdk_cairo_region_create_from_surface (surface);
cairo_surface_destroy (surface);
gtk_widget_shape_combine_region (widget, shape);
cairo_region_destroy (shape);
-#else
- gtk_widget_shape_combine_mask (widget, mask, 0, 0);
- g_object_unref (mask);
-#endif
}
static void