mirror of
https://github.com/yshui/picom.git
synced 2024-11-25 14:06:08 -05:00
animation: fix interrupting animation makes it stuck for one frame
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
184fce34bf
commit
8bf10edbe9
1 changed files with 4 additions and 0 deletions
|
@ -1939,6 +1939,10 @@ bool win_process_animation_and_state_change(struct session *ps, struct win *w, d
|
|||
|
||||
auto new_animation = script_instance_new(wopts.animations[trigger].script);
|
||||
if (w->running_animation_instance) {
|
||||
// Interrupt the old animation and start the new animation from where the
|
||||
// old has left off. Note we still need to advance the old animation for
|
||||
// the last interval.
|
||||
win_advance_animation(w, delta_t, &win_ctx);
|
||||
if (geometry_changed) {
|
||||
// If the window has moved, we need to adjust scripts
|
||||
// outputs so that the window will stay in the same position and
|
||||
|
|
Loading…
Reference in a new issue