Skip to content

Commit

Permalink
backend/xrender: fix rounded corner mask for blit
Browse files Browse the repository at this point in the history
The coordinate conversions were wrong here too.

Fixes #1352

Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Oct 12, 2024
1 parent 3b117e2 commit f3eec99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

* Fix memory corruption that can happen when handling window property changes (#1350)
* Fix `force-win-blend` having no effect (#1354)
* Fix shadow being rendered incorrectly in xrender backend (#1352)

# 12.2 (2024-Oct-10)

Expand Down
4 changes: 3 additions & 1 deletion src/backend/xrender/xrender.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ static bool xrender_blit(struct backend_base *base, ivec2 origin,
int16_t mask_pict_dst_x = 0, mask_pict_dst_y = 0;
if (args->source_mask != NULL) {
ivec2 mask_origin = args->source_mask->origin;
mask_pict = xrender_process_mask(xd, args->source_mask, extent,
auto extent_to_mask =
region_translate_rect(extent, ivec2_neg(ivec2_add(mask_origin, origin)));
mask_pict = xrender_process_mask(xd, args->source_mask, extent_to_mask,
args->opacity < 1.0 ? mask_pict : XCB_NONE,
&mask_origin, &mask_allocated);
mask_pict_dst_x = to_i16_checked(-mask_origin.x);
Expand Down

0 comments on commit f3eec99

Please sign in to comment.