Skip to content

Commit

Permalink
animation: fix interrupting animation makes it stuck for one frame
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information
yshui committed Aug 11, 2024
1 parent 3eb5da6 commit 1ff8f66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wm/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,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
Expand Down

0 comments on commit 1ff8f66

Please sign in to comment.