mirror of
https://github.com/yshui/picom.git
synced 2024-10-27 05:24:17 -04:00
Merge pull request #1211 from absolutelynothelix/temp
fix assertion failure if win_bind_shadow fails
This commit is contained in:
commit
cc8e0a9848
1 changed files with 10 additions and 8 deletions
|
@ -332,16 +332,18 @@ bool paint_all_new(session_t *ps, struct managed_win *const t) {
|
|||
}
|
||||
}
|
||||
|
||||
// Draw shadow on target
|
||||
if (w->shadow) {
|
||||
if (w->shadow_image == NULL) {
|
||||
// The win_bind_shadow function must be called before checking if a window
|
||||
// has shadow enabled because it disables shadow for a window on failure.
|
||||
if (w->shadow && !w->shadow_image) {
|
||||
struct color shadow_color = {.red = ps->o.shadow_red,
|
||||
.green = ps->o.shadow_green,
|
||||
.blue = ps->o.shadow_blue,
|
||||
.alpha = ps->o.shadow_opacity};
|
||||
win_bind_shadow(ps->backend_data, w, shadow_color,
|
||||
ps->shadow_context);
|
||||
win_bind_shadow(ps->backend_data, w, shadow_color, ps->shadow_context);
|
||||
}
|
||||
|
||||
// Draw shadow on target
|
||||
if (w->shadow) {
|
||||
// Clip region for the shadow
|
||||
// reg_shadow \in reg_paint
|
||||
auto reg_shadow = win_extents_by_val(w);
|
||||
|
|
Loading…
Reference in a new issue