diff --git a/src/backend/xrender/xrender.c b/src/backend/xrender/xrender.c index 63e2a84..9b2f99d 100644 --- a/src/backend/xrender/xrender.c +++ b/src/backend/xrender/xrender.c @@ -422,10 +422,10 @@ static bool image_op(backend_t *base, enum image_operations op, void *image, break; } - auto alpha_pict = xd->alpha_pict[(int)(dargs[0] * 255)]; + auto alpha_pict = xd->alpha_pict[(int)((1-dargs[0]) * 255)]; x_set_picture_clip_region(base->c, img->pict, 0, 0, ®); - xcb_render_composite(base->c, XCB_RENDER_PICT_OP_IN, img->pict, XCB_NONE, - alpha_pict, 0, 0, 0, 0, 0, 0, tmpw, tmph); + xcb_render_composite(base->c, XCB_RENDER_PICT_OP_OUT_REVERSE, alpha_pict, XCB_NONE, + img->pict, 0, 0, 0, 0, 0, 0, tmpw, tmph); img->has_alpha = true; break; case IMAGE_OP_RESIZE_TILE: