From fc75ecb1eb1ba3d8ad3b59f0672709e75cfb4568 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 ++++++++++------- src/mango.c | 3 ++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/animation/client.h b/src/animation/client.h index 8560ad98..dfdaf9b9 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -813,7 +813,7 @@ void client_apply_clip(Client *c, float factor) { enum corner_location current_corner_location = set_client_corner_location(c); - 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 = @@ -1176,13 +1176,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; @@ -1344,11 +1343,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); @@ -1506,7 +1509,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, diff --git a/src/mango.c b/src/mango.c index 5a9e4207..38ccc621 100644 --- a/src/mango.c +++ b/src/mango.c @@ -4857,7 +4857,8 @@ void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy, if (config.sloppyfocus && !start_drag_window && c && time && c->scene && c->scene->node.enabled && !c->animation.tagining && - (surface != seat->pointer_state.focused_surface || (selmon && selmon->isoverview && selmon->sel != c)) && + (surface != seat->pointer_state.focused_surface || + (selmon && selmon->isoverview && selmon->sel != c)) && !client_is_unmanaged(c) && VISIBLEON(c, c->mon)) focusclient(c, 0);