From 5942c5d80783c78f0c53f19891d6c4354f54655e Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 20 Jan 2026 13:50:43 +0800 Subject: [PATCH] opt: only disable animation for resizewin tiling window --- src/dispatch/bind_define.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 2d40c22..95d365c 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -383,9 +383,6 @@ int32_t movewin(const Arg *arg) { if (!c->isfloating) togglefloating(NULL); - int32_t animations_state_backup = animations; - animations = 0; - switch (arg->ui) { case NUM_TYPE_MINUS: c->geom.x -= arg->i; @@ -413,7 +410,6 @@ int32_t movewin(const Arg *arg) { c->iscustomsize = 1; c->float_geom = c->geom; resize(c, c->geom, 0); - animations = animations_state_backup; return 0; } @@ -431,7 +427,8 @@ int32_t resizewin(const Arg *arg) { return 0; int32_t animations_state_backup = animations; - animations = 0; + if (!c->isfloating) + animations = 0; if (ISTILED(c)) { switch (arg->ui) { @@ -585,9 +582,6 @@ int32_t smartmovewin(const Arg *arg) { nx = c->geom.x; ny = c->geom.y; - int32_t animations_state_backup = animations; - animations = 0; - switch (arg->i) { case UP: tar = -99999; @@ -674,7 +668,6 @@ int32_t smartmovewin(const Arg *arg) { .x = nx, .y = ny, .width = c->geom.width, .height = c->geom.height}; c->iscustomsize = 1; resize(c, c->float_geom, 1); - animations = animations_state_backup; return 0; } @@ -690,9 +683,6 @@ int32_t smartresizewin(const Arg *arg) { nw = c->geom.width; nh = c->geom.height; - int32_t animations_state_backup = animations; - animations = 0; - switch (arg->i) { case UP: nh -= selmon->w.height / 8; @@ -748,7 +738,6 @@ int32_t smartresizewin(const Arg *arg) { .x = c->geom.x, .y = c->geom.y, .width = nw, .height = nh}; c->iscustomsize = 1; resize(c, c->float_geom, 1); - animations = animations_state_backup; return 0; }