From 1c4545021f835f077362e7364d28752b7d6e968e Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Wed, 30 Aug 2017 17:46:41 +0200 Subject: [PATCH] render: Reset animated cursor timer when sprite changes. Previously the timer would not reset if the sprite changed and timer from a previous animated cursor was pending. That caused trouble with non-looped animated cursors that use very long delay on the last frame to prevent looping. No animation played after such non-looped animation played once. --- render/animcur.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/render/animcur.c b/render/animcur.c index 52e6b8b79..4216c3a40 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -204,11 +204,9 @@ AnimCurDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) pDev->spriteInfo->anim.pCursor = pCursor; pDev->spriteInfo->anim.pScreen = pScreen; - if (!as->timer_set) { - TimerSet(as->timer, TimerAbsolute, pDev->spriteInfo->anim.time, - AnimCurTimerNotify, pScreen); - as->timer_set = TRUE; - } + TimerSet(as->timer, TimerAbsolute, pDev->spriteInfo->anim.time, + AnimCurTimerNotify, pScreen); + as->timer_set = TRUE; } } else -- 2.12.3