mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-05 13:29:54 -05:00
fix: The conflict of animation types leads to unstable animation spee
This commit is contained in:
parent
c72888d391
commit
3b3f60e954
1 changed files with 28 additions and 14 deletions
42
src/maomao.c
42
src/maomao.c
|
|
@ -998,6 +998,11 @@ void client_animation_next_tick(Client *c) {
|
||||||
c->animation.begin_fade_in = false;
|
c->animation.begin_fade_in = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clear the open action state
|
||||||
|
// To prevent him from being mistaken that
|
||||||
|
// it's still in the opening animation in resize
|
||||||
|
c->animation.action = MOVE;
|
||||||
|
|
||||||
c->animation.tagining = false;
|
c->animation.tagining = false;
|
||||||
c->animation.running = false;
|
c->animation.running = false;
|
||||||
|
|
||||||
|
|
@ -1695,24 +1700,33 @@ arrange(Monitor *m, bool want_animation) {
|
||||||
}
|
}
|
||||||
client_set_suspended(c, false);
|
client_set_suspended(c, false);
|
||||||
if (!c->animation.from_rule && want_animation &&
|
if (!c->animation.from_rule && want_animation &&
|
||||||
m->pertag->prevtag != 0 && m->pertag->curtag != 0 && animations &&
|
m->pertag->prevtag != 0 && m->pertag->curtag != 0 && animations) {
|
||||||
!c->animation.running) {
|
|
||||||
c->animation.tagining = true;
|
c->animation.tagining = true;
|
||||||
if (m->pertag->curtag > m->pertag->prevtag) {
|
if (m->pertag->curtag > m->pertag->prevtag) {
|
||||||
c->animainit_geom.x = tag_animation_direction == VERTICAL
|
if(c->animation.running) {
|
||||||
? c->animation.current.x
|
c->animainit_geom.x = c->animation.current.x;
|
||||||
: c->mon->m.x + c->mon->m.width;
|
c->animainit_geom.y = c->animation.current.y;
|
||||||
c->animainit_geom.y = tag_animation_direction == VERTICAL
|
} else {
|
||||||
? c->mon->m.y + c->mon->m.height
|
c->animainit_geom.x = tag_animation_direction == VERTICAL
|
||||||
: c->animation.current.y;
|
? c->animation.current.x
|
||||||
|
: c->mon->m.x + c->mon->m.width;
|
||||||
|
c->animainit_geom.y = tag_animation_direction == VERTICAL
|
||||||
|
? c->mon->m.y + c->mon->m.height
|
||||||
|
: c->animation.current.y;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
c->animainit_geom.x = tag_animation_direction == VERTICAL
|
if(c->animation.running) {
|
||||||
? c->animation.current.x
|
c->animainit_geom.x = c->animation.current.x;
|
||||||
: m->m.x - c->geom.width;
|
c->animainit_geom.y = c->animation.current.y;
|
||||||
c->animainit_geom.y = tag_animation_direction == VERTICAL
|
} else {
|
||||||
? m->m.y - c->geom.height
|
c->animainit_geom.x = tag_animation_direction == VERTICAL
|
||||||
: c->animation.current.y;
|
? c->animation.current.x
|
||||||
|
: m->m.x - c->geom.width;
|
||||||
|
c->animainit_geom.y = tag_animation_direction == VERTICAL
|
||||||
|
? m->m.y - c->geom.height
|
||||||
|
: c->animation.current.y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
c->animainit_geom.x = c->animation.current.x;
|
c->animainit_geom.x = c->animation.current.x;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue