Formerly spriteInfo->anim.pCursor would point to the animated cursor (or NULL if not animated). That value would also be available in spriteInfo->sprite->current, so instead lets use anim.pCursor to point to the current animation element.
Signed-off-by: Adam Jackson <a...@redhat.com> --- render/animcur.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/render/animcur.c b/render/animcur.c index b5d222bc6..65327df65 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -133,7 +133,7 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg) ScreenPtr pScreen = dev->spriteInfo->anim.pScreen; AnimCurScreenPtr as = GetAnimCurScreen(pScreen); - AnimCurPtr ac = GetAnimCur(dev->spriteInfo->anim.pCursor); + AnimCurPtr ac = GetAnimCur(dev->spriteInfo->sprite->current); int elt = (dev->spriteInfo->anim.elt + 1) % ac->nelt; DisplayCursorProcPtr DisplayCursor = pScreen->DisplayCursor; @@ -147,6 +147,7 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg) pScreen->DisplayCursor = DisplayCursor; dev->spriteInfo->anim.elt = elt; + dev->spriteInfo->anim.pCursor = ac->elts[elt].pCursor; return ac->elts[elt].delay; } @@ -154,7 +155,7 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg) static void AnimCurCancelTimer(DeviceIntPtr pDev) { - CursorPtr cur = pDev->spriteInfo->anim.pCursor; + CursorPtr cur = pDev->spriteInfo->sprite->current; if (IsAnimCur(cur)) TimerCancel(GetAnimCur(cur)->timer); @@ -171,7 +172,7 @@ AnimCurDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) Unwrap(as, pScreen, DisplayCursor); if (IsAnimCur(pCursor)) { - if (pCursor != pDev->spriteInfo->anim.pCursor) { + if (pCursor != pDev->spriteInfo->sprite->current) { AnimCurPtr ac = GetAnimCur(pCursor); AnimCurCancelTimer(pDev); -- 2.14.3 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel