[PATCH] render: Reset animated cursor timer when sprite changes.

msrb at suse.com msrb at suse.com
Thu Aug 31 06:47:58 UTC 2017


From: Michal Srb <msrb at suse.com>

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.

Bugzilla: https://bugs.freedesktop.org/99798
---
 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



More information about the xorg-devel mailing list