forked from pool/xorg-x11-server
35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
|
Author: Илья Индиго <ilya@ilya.pp.ua>
|
||
|
Subject: [PATCH] render: Reset animated cursor timer when sprite changes.
|
||
|
Patch-Mainline: To be upstreamed
|
||
|
Git-commit: 1c4545021f835f077362e7364d28752b7d6e968e
|
||
|
References: boo#1020061
|
||
|
Signed-off-by: Michal Srb <msrb@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.
|
||
|
---
|
||
|
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
|