From 86c5c065a9348a1e5c1f3712fd13a0bdc10f7998 Mon Sep 17 00:00:00 2001 From: Thomas Jaeger Date: Tue, 6 Jan 2009 00:17:45 -0500 Subject: [PATCH] Don't create animated cursors for slave devices Fixes bug #19034 --- render/animcur.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/render/animcur.c b/render/animcur.c index d80094d..e117915 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -230,11 +230,15 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Bool ret; + DeviceIntPtr pMasterDev = pDev->isMaster ? pDev : pDev->u.master; + + if (!pMasterDev) + return FALSE; Unwrap (as, pScreen, DisplayCursor); if (IsAnimCur(pCursor)) { - if (pCursor != animCurState[pDev->id].pCursor) + if (pCursor != animCurState[pMasterDev->id].pCursor) { AnimCurPtr ac = GetAnimCur(pCursor); @@ -242,10 +246,10 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, (pDev, pScreen, ac->elts[0].pCursor); if (ret) { - animCurState[pDev->id].elt = 0; - animCurState[pDev->id].time = GetTimeInMillis () + ac->elts[0].delay; - animCurState[pDev->id].pCursor = pCursor; - animCurState[pDev->id].pScreen = pScreen; + animCurState[pMasterDev->id].elt = 0; + animCurState[pMasterDev->id].time = GetTimeInMillis () + ac->elts[0].delay; + animCurState[pMasterDev->id].pCursor = pCursor; + animCurState[pMasterDev->id].pScreen = pScreen; } } else @@ -253,8 +257,8 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, } else { - animCurState[pDev->id].pCursor = 0; - animCurState[pDev->id].pScreen = 0; + animCurState[pMasterDev->id].pCursor = 0; + animCurState[pMasterDev->id].pScreen = 0; ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } Wrap (as, pScreen, DisplayCursor, AnimCurDisplayCursor); -- 1.6.0.4