diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index 321857d..2b5c4fe 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -627,6 +627,10 @@ _get_image_surface (cairo_xlib_surface_t *surface, masks.red_mask = surface->visual->red_mask; masks.green_mask = surface->visual->green_mask; masks.blue_mask = surface->visual->blue_mask; + if (surface->depth == 32) + masks.alpha_mask = ~(masks.red_mask | + masks.green_mask | + masks.blue_mask); } else if (surface->xrender_format) { masks.bpp = ximage->bits_per_pixel; masks.red_mask = (unsigned long)surface->xrender_format->direct.redMask << surface->xrender_format->direct.red;