win: assert we won't clobber existing mask

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-11-15 18:03:31 +00:00
parent 7d0d693ca7
commit 9d7cbe49f1
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 1 additions and 0 deletions

View File

@ -346,6 +346,7 @@ static inline bool win_bind_pixmap(struct backend_base *b, struct managed_win *w
}
bool win_bind_mask(struct backend_base *b, struct managed_win *w) {
assert(!w->mask_image);
auto reg_bound_local = win_get_bounding_shape_global_by_val(w);
pixman_region32_translate(&reg_bound_local, -w->g.x, -w->g.y);
w->mask_image = b->ops->make_mask(