mirror of https://github.com/yshui/picom.git
win: don't re-bind mask image when there is already one
Co-authored-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
d4f72828f7
commit
4e6dddc76e
|
@ -368,7 +368,10 @@ bool win_bind_shadow(struct backend_base *b, struct managed_win *w, struct color
|
||||||
b->ops->shadow_from_mask == NULL) {
|
b->ops->shadow_from_mask == NULL) {
|
||||||
w->shadow_image = b->ops->render_shadow(b, w->widthb, w->heightb, sctx, c);
|
w->shadow_image = b->ops->render_shadow(b, w->widthb, w->heightb, sctx, c);
|
||||||
} else {
|
} else {
|
||||||
|
if (!w->mask_image) {
|
||||||
|
// It's possible we already allocated a mask because of background blur
|
||||||
win_bind_mask(b, w);
|
win_bind_mask(b, w);
|
||||||
|
}
|
||||||
w->shadow_image = b->ops->shadow_from_mask(b, w->mask_image, sctx, c);
|
w->shadow_image = b->ops->shadow_from_mask(b, w->mask_image, sctx, c);
|
||||||
}
|
}
|
||||||
if (!w->shadow_image) {
|
if (!w->shadow_image) {
|
||||||
|
|
Loading…
Reference in New Issue