From fffc7ce5359c2dc0a192c2f9c8d3ded78e77abfd Mon Sep 17 00:00:00 2001 From: clement Date: Fri, 26 Jan 2024 09:54:28 +0000 Subject: [PATCH 1/2] Properly animates depending on wintype animation property in config --- src/win.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/win.c b/src/win.c index 82563dd..d5d77ef 100644 --- a/src/win.c +++ b/src/win.c @@ -484,18 +484,19 @@ static void init_animation(session_t *ps, struct managed_win *w) { } static double *anim_x, *anim_y, *anim_w, *anim_h; enum open_window_animation animation; - if (ps->o.wintype_option[w->window_type].animation != OPEN_WINDOW_ANIMATION_INVALID - && !w->dwm_mask) { - animation = ps->o.wintype_option[w->window_type].animation; - } - else - animation = ps->o.animation_for_open_window; + + + animation = ps->o.animation_for_open_window; if (w->window_type != WINTYPE_TOOLTIP && wid_has_prop(ps, w->client_win, ps->atoms->aWM_TRANSIENT_FOR)) { animation = ps->o.animation_for_transient_window; } + if (ps->o.wintype_option[w->window_type].animation != OPEN_WINDOW_ANIMATION_INVALID + && !w->dwm_mask) { + animation = ps->o.wintype_option[w->window_type].animation; + } anim_x = &w->animation_center_x, anim_y = &w->animation_center_y; anim_w = &w->animation_w, anim_h = &w->animation_h; From 39de1e49cfc1b39adbdcff825ee2b9b7f28c9ddd Mon Sep 17 00:00:00 2001 From: clement Date: Fri, 26 Jan 2024 11:51:53 +0000 Subject: [PATCH 2/2] fixed window unmap crash --- src/picom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/picom.c b/src/picom.c index e1c6b5b..2de4e28 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1051,7 +1051,7 @@ paint_preprocess(session_t *ps, bool *fade_running, bool *animation_running) { } // Submit window size change - if (size_changed) { + if (size_changed && w->state != WSTATE_UNMAPPED && w->state != WSTATE_DESTROYING && w->state != WSTATE_UNMAPPING) { win_on_win_size_change(ps, w); pixman_region32_clear(&w->bounding_shape);