[PATCH v2 4/4] render: anim cursor states can live without track screen

Tiago Vignatti tiago.vignatti at nokia.com
Fri May 7 08:24:19 PDT 2010


It's enough to display animated cursors only if IsAnimCur returns true.

Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 include/inputstr.h |    1 -
 render/animcur.c   |    5 +----
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/include/inputstr.h b/include/inputstr.h
index e87411f..0403e9d 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -480,7 +480,6 @@ typedef struct _SpriteInfoRec {
 
     /* keep states for animated cursor */
     CursorPtr           pCursor;
-    ScreenPtr           pScreen;
     int             elt;
     CARD32          time;
 
diff --git a/render/animcur.c b/render/animcur.c
index 8e2b498..f3e7460 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -154,7 +154,7 @@ AnimCurScreenBlockHandler (int screenNum,
 
     for (dev = inputInfo.devices; dev; dev = dev->next)
     {
-	if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->pScreen)
+	if (IsAnimCur(dev->spriteInfo->pCursor))
 	{
 	    if (!now) now = GetTimeInMillis (); 
 
@@ -216,7 +216,6 @@ AnimCurDisplayCursor (DeviceIntPtr pDev,
 		pDev->spriteInfo->elt = 0;
 		pDev->spriteInfo->time = GetTimeInMillis () + ac->elts[0].delay;
 		pDev->spriteInfo->pCursor = pCursor;
-		pDev->spriteInfo->pScreen = pScreen;
 	    }
 	}
 	else
@@ -241,8 +240,6 @@ AnimCurSetCursorPosition (DeviceIntPtr pDev,
     Bool		ret;
     
     Unwrap (as, pScreen, SetCursorPosition);
-    if (pDev->spriteInfo->pCursor)
-	pDev->spriteInfo->pScreen = pScreen;
 
     ret = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent);
     Wrap (as, pScreen, SetCursorPosition, AnimCurSetCursorPosition);
-- 
1.6.0.4



More information about the xorg-devel mailing list