mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-12 13:30:01 -05:00
opt: optimize layer animation action set
This commit is contained in:
parent
d5c2d3a5ac
commit
beffcdd61d
2 changed files with 3 additions and 3 deletions
|
|
@ -416,7 +416,7 @@ void layer_set_pending_state(LayerSurface *l) {
|
|||
|
||||
l->pending = l->geom;
|
||||
|
||||
if (l->animation.action == OPEN) {
|
||||
if (l->animation.action == OPEN && !l->animation.running) {
|
||||
|
||||
if ((!l->animation_type_open &&
|
||||
strcmp(layer_animation_type_open, "zoom") == 0) ||
|
||||
|
|
@ -461,8 +461,6 @@ void layer_set_pending_state(LayerSurface *l) {
|
|||
l->animation.should_animate = false;
|
||||
}
|
||||
|
||||
l->animation.duration = animation_duration_open;
|
||||
l->animation.action = OPEN;
|
||||
// 开始动画
|
||||
layer_commit(l);
|
||||
l->dirty = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue