From 8f69c935f6d06ad92fd0e8d9fcb3cde86cd258f5 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Fri, 17 Sep 2010 02:27:59 +0200 Subject: Eliminate MAXSCREENS-sized CursorScreenKey array. Use new per-screen privates API instead. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp Signed-off-by: Josh Triplett Reviewed-by: Peter Hutterer --- hw/xfree86/ramdac/xf86Cursor.c | 6 +++--- hw/xfree86/ramdac/xf86HWCurs.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/xfree86/ramdac') diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 24c91cc37..1e0f7e0b7 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -273,7 +273,7 @@ xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) - dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL); + dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen, NULL); return (*ScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs); } @@ -286,8 +286,8 @@ xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) { - free(dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen))); - dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL); + free(dixLookupScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen)); + dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen, NULL); } return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs); diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index dd2b78f98..f9b09fc9a 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -123,7 +123,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) return; } - bits = dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen)); + bits = dixLookupScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen); x -= infoPtr->pScrn->frameX0 + ScreenPriv->HotX; y -= infoPtr->pScrn->frameY0 + ScreenPriv->HotY; @@ -133,7 +133,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) #endif if (!bits) { bits = (*infoPtr->RealizeCursor)(infoPtr, pCurs); - dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), bits); + dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen, bits); } if (!(infoPtr->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) -- cgit v1.2.3