mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-04 04:06:21 -05:00
opt: disable animaiton for resize and move window dispatch
This commit is contained in:
parent
e0d69ece59
commit
deaa26c779
2 changed files with 17 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue