1
0
Fork 0
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:
Yuxuan Shui 2024-08-11 12:02:32 +01:00
parent 184fce34bf
commit 8bf10edbe9
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -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