diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 3ca7997..c708de8 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -382,6 +382,9 @@ 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; @@ -409,6 +412,7 @@ 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; } @@ -425,6 +429,9 @@ int32_t resizewin(const Arg *arg) { if (!c || c->isfullscreen || c->ismaximizescreen) return 0; + int32_t animations_state_backup = animations; + animations = 0; + if (ISTILED(c)) { switch (arg->ui) { case NUM_TYPE_MINUS: @@ -450,6 +457,7 @@ int32_t resizewin(const Arg *arg) { break; } resize_tile_client(c, false, offsetx, offsety, 0); + animations = animations_state_backup; return 0; } @@ -480,6 +488,7 @@ int32_t resizewin(const Arg *arg) { c->iscustomsize = 1; c->float_geom = c->geom; resize(c, c->geom, 0); + animations = animations_state_backup; return 0; } @@ -575,6 +584,9 @@ 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; @@ -661,6 +673,7 @@ 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; } @@ -676,6 +689,9 @@ 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; @@ -731,6 +747,7 @@ 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; } diff --git a/src/layout/arrange.h b/src/layout/arrange.h index 1f7001f..fa8556e 100644 --- a/src/layout/arrange.h +++ b/src/layout/arrange.h @@ -519,9 +519,6 @@ void resize_tile_client(Client *grabc, bool isdrag, int32_t offsetx, if (grabc->mon->isoverview) return; - int32_t animations_state_backup = animations; - animations = 0; - const Layout *current_layout = grabc->mon->pertag->ltidxs[grabc->mon->pertag->curtag]; if (current_layout->id == TILE || current_layout->id == DECK || @@ -540,8 +537,6 @@ void resize_tile_client(Client *grabc, bool isdrag, int32_t offsetx, } else if (current_layout->id == VERTICAL_SCROLLER) { resize_tile_scroller(grabc, isdrag, offsetx, offsety, time, true); } - - animations = animations_state_backup; } void reset_size_per_mon(Monitor *m, int32_t tile_cilent_num,