From a6057aeeb83ee9771c9b5c81e50dd6f31dd8c68d Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 19 May 2026 13:26:21 +0800 Subject: [PATCH] fix for no animations --- src/animation/client.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/animation/client.h b/src/animation/client.h index af6764ab..41cf4110 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -696,7 +696,7 @@ void client_apply_clip(Client *c, float factor) { struct ivec2 offset; BufferData buffer_data; - if (!config.animations) { + if (!config.animations && !c->mon->isoverview) { c->animation.running = false; c->need_output_flush = false; c->animainit_geom = c->current = c->pending = c->animation.current = @@ -1065,13 +1065,12 @@ void client_set_pending_state(Client *c) { if (!c || c->iskilling) return; - if (!config.animations) { + if (!config.animations && !c->mon->isoverview) { c->animation.should_animate = false; } else if (config.animations && c->animation.tagining) { c->animation.should_animate = true; - } else if (!config.animations || c == grabc || - (!c->is_pending_open_animation && - wlr_box_equal(&c->current, &c->pending))) { + } else if (c == grabc || (!c->is_pending_open_animation && + wlr_box_equal(&c->current, &c->pending))) { c->animation.should_animate = false; } else { c->animation.should_animate = true; @@ -1233,11 +1232,15 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) { c->animainit_geom = c->geom; } - if (c->mon->isoverview && c != c->mon->sel && + if (config.animations && c->mon->isoverview && c != c->mon->sel && c->animation.action == OVERVIEW) { set_overview_enter_animation(c); } + if (!config.animations && c->mon->isoverview) { + c->animainit_geom = c->geom; + } + // 开始应用动画设置 client_set_pending_state(c); @@ -1401,7 +1404,7 @@ bool client_draw_frame(Client *c) { return client_apply_focus_opacity(c); } - if (config.animations && c->animation.running) { + if ((config.animations || c->mon->isoverview) && c->animation.running) { client_animation_next_tick(c); } else { wlr_scene_node_set_position(&c->scene->node, c->pending.x,