From 2b68d1b615eb09360dbfba90ef129082befae782 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 12 May 2026 14:23:47 +0800 Subject: [PATCH] opt: more reasonable multi-tag window animations --- src/animation/tag.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/animation/tag.h b/src/animation/tag.h index 18eef56a..1a973784 100644 --- a/src/animation/tag.h +++ b/src/animation/tag.h @@ -5,6 +5,16 @@ void set_tagin_animation(Monitor *m, Client *c) { return; } + if ((c->isglobal || c->isunglobal) || + (c->tags & (1 << (m->pertag->prevtag - 1)) && + c->tags & (1 << (m->pertag->curtag - 1)))) { + c->animation.tagouting = false; + c->animation.tagouted = false; + c->animation.tagining = false; + c->animation.action = MOVE; + return; + } + if (m->pertag->curtag > m->pertag->prevtag) { c->animainit_geom.x = config.tag_animation_direction == VERTICAL @@ -55,6 +65,17 @@ void set_arrange_visible(Monitor *m, Client *c, bool want_animation) { } void set_tagout_animation(Monitor *m, Client *c) { + + if ((c->isglobal || c->isunglobal) || + (c->tags & (1 << (m->pertag->prevtag - 1)) && + c->tags & (1 << (m->pertag->curtag - 1)))) { + c->animation.tagouting = false; + c->animation.tagouted = false; + c->animation.tagining = false; + c->animation.action = MOVE; + return; + } + if (m->pertag->curtag > m->pertag->prevtag) { c->pending = c->geom; c->pending.x = @@ -82,6 +103,7 @@ void set_tagout_animation(Monitor *m, Client *c) { } void set_arrange_hidden(Monitor *m, Client *c, bool want_animation) { + if ((c->tags & (1 << (m->pertag->prevtag - 1))) && m->pertag->prevtag != 0 && m->pertag->curtag != 0 && config.animations) {