X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libview%2Fev-loading-window.c;h=4d5eaaf1407f4ee129bc18940d7c906790dc67db;hb=032bcdd3c1d1fd84fdd8414ef661103be36cfe9c;hp=c04933b57e4df46a12bb3142a85e0cf43c31500a;hpb=55987f7d1bde72651c83b48cae7c8207a7ef08ab;p=evince.git diff --git a/libview/ev-loading-window.c b/libview/ev-loading-window.c index c04933b5..4d5eaaf1 100644 --- a/libview/ev-loading-window.c +++ b/libview/ev-loading-window.c @@ -177,7 +177,8 @@ ev_loading_window_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { EvLoadingWindow *window = EV_LOADING_WINDOW (widget); - GdkPixmap *mask; + cairo_surface_t *surface; + cairo_region_t *shape; cairo_t *cr; double r; @@ -189,8 +190,10 @@ ev_loading_window_size_allocate (GtkWidget *widget, window->width = allocation->width; window->height = allocation->height; - mask = gdk_pixmap_new (NULL, window->width, window->height, 1); - cr = gdk_cairo_create (GDK_DRAWABLE (mask)); + surface = cairo_image_surface_create (CAIRO_FORMAT_A8, + window->width, + window->height); + cr = cairo_create (surface); cairo_save (cr); cairo_rectangle (cr, 0, 0, window->width, window->height); @@ -205,8 +208,11 @@ ev_loading_window_size_allocate (GtkWidget *widget, cairo_destroy (cr); - gtk_widget_shape_combine_mask (widget, mask, 0, 0); - g_object_unref (mask); + shape = gdk_cairo_region_create_from_surface (surface); + cairo_surface_destroy (surface); + + gtk_widget_shape_combine_region (widget, shape); + cairo_region_destroy (shape); } static void