[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    [PATCH 4/5] dix: remove XineramaChangeToCursor.
From:       Peter Hutterer <peter.hutterer () who-t ! net>
Date:       2009-01-30 7:05:31
Message-ID: 1233299132-17811-5-git-send-email-peter.hutterer () who-t ! net
[Download RAW message or body]

It's nearly identical to ChangeToCursor now anyway.
---
 dix/events.c |   38 ++++++++++----------------------------
 1 files changed, 10 insertions(+), 28 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 2b501aa..abee4b9 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -550,24 +550,6 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
     CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
 }
 
-
-static void
-XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
-{
-    SpritePtr pSprite = pDev->spriteInfo->sprite;
-
-    if (cursor != pSprite->current)
-    {
-	if ((pSprite->current->bits->xhot != cursor->bits->xhot) ||
-		(pSprite->current->bits->yhot != cursor->bits->yhot))
-	    CheckPhysLimits(pDev, cursor, FALSE, FALSE, NULL);
-	(*pSprite->screen->DisplayCursor)(pDev, pSprite->screen, cursor);
-	FreeCursor(pSprite->current, (Cursor)0);
-	pSprite->current = cursor;
-	pSprite->current->refcnt++;
-    }
-}
-
 #else
 #define SyntheticMotion(dev, x, y) \
      PostSyntheticMotion(dev, x, y, \
@@ -849,13 +831,7 @@ static void
 ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
 {
     SpritePtr pSprite = pDev->spriteInfo->sprite;
-
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) {
-	XineramaChangeToCursor(pDev, cursor);
-	return;
-    }
-#endif
+    ScreenPtr pScreen;
 
     if (cursor != pSprite->current)
     {
@@ -863,9 +839,15 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
 		(pSprite->current->bits->yhot != cursor->bits->yhot))
 	    CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined,
 			    (ScreenPtr)NULL);
-        (*pSprite->hotPhys.pScreen->DisplayCursor) (pDev,
-                                                   pSprite->hotPhys.pScreen,
-                                                   cursor);
+#ifdef PANORAMIX
+        /* XXX: is this really necessary?? (whot) */
+        if (!noPanoramiXExtension)
+            pScreen = pSprite->screen;
+        else
+#endif
+            pScreen = pSprite->hotPhys.pScreen;
+
+        (*pSprite->hotPhys.pScreen->DisplayCursor)(pDev, pScreen, cursor);
 	FreeCursor(pSprite->current, (Cursor)0);
 	pSprite->current = cursor;
 	pSprite->current->refcnt++;
-- 
1.6.0.6

_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic