diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-08-27 19:27:13 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-08-27 19:27:13 -0400 |
commit | ec7907f8fa04dcff2649cc4846975844314f737e (patch) | |
tree | 29236baa9e98868c99fe5a18cb8aad0446d8a93c /hw | |
parent | 86898491497a43814caf42013651086e62fe6162 (diff) |
Add an array of integers for use as per-screen cursor private keys.
Replaces the use of the screen pointer itself as the key, which was
nice but won't work now that an array index is being stored.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/dmx/dmxcursor.h | 6 | ||||
-rw-r--r-- | hw/xfree86/loader/dixsym.c | 1 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Cursors.c | 4 | ||||
-rw-r--r-- | hw/xfree86/ramdac/xf86Cursor.c | 6 | ||||
-rw-r--r-- | hw/xfree86/ramdac/xf86HWCurs.c | 4 | ||||
-rw-r--r-- | hw/xnest/XNCursor.h | 6 |
6 files changed, 14 insertions, 13 deletions
diff --git a/hw/dmx/dmxcursor.h b/hw/dmx/dmxcursor.h index da8ea5e85..5242268c1 100644 --- a/hw/dmx/dmxcursor.h +++ b/hw/dmx/dmxcursor.h @@ -63,10 +63,10 @@ extern void dmxHideCursor(DMXScreenInfo *dmxScreen); extern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor); extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor); -#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) \ - ((dmxCursorPrivPtr)dixLookupPrivate(&(_pCursor)->devPrivates, _pScreen)) +#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) ((dmxCursorPrivPtr) \ + dixLookupPrivate(&(_pCursor)->devPrivates, CursorScreenKey(_pScreen))) #define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \ - dixSetPrivate(&(_pCursor)->devPrivates, _pScreen, v) + dixSetPrivate(&(_pCursor)->devPrivates, CursorScreenKey(_pScreen), v) #endif /* DMXCURSOR_H */ diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index e9de050f9..a18a0ea27 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -112,6 +112,7 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(QueryColors) /* cursor.c */ SYMFUNC(FreeCursor) + SYMVAR(cursorScreenDevPriv) /* deprecated.c */ SYMFUNC(LookupClient) SYMFUNC(LookupDrawable) diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index 5dddaddb0..a7ed5c4d4 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -230,7 +230,7 @@ xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg) int c; CARD8 *bits = cursor ? #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) - dixLookupPrivate(&cursor->devPrivates, screen) + dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen)) #else cursor->devPriv[screen->myNum] #endif @@ -617,7 +617,7 @@ xf86_reload_cursors (ScreenPtr screen) if (cursor) { #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) - void *src = dixLookupPrivate(&cursor->devPrivates, screen); + void *src = dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen)); #else void *src = cursor->devPriv[screen->myNum]; #endif diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 3c98f6e7d..be4fb908e 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -269,7 +269,7 @@ xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) - dixSetPrivate(&pCurs->devPrivates, pScreen, NULL); + dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL); return (*ScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs); } @@ -282,8 +282,8 @@ xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) { - xfree(dixLookupPrivate(&pCurs->devPrivates, pScreen)); - dixSetPrivate(&pCurs->devPrivates, pScreen, NULL); + xfree(dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen))); + dixSetPrivate(&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 d10e283d7..ea0523362 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 = (unsigned char *)dixLookupPrivate(&pCurs->devPrivates, pScreen); + bits = dixLookupPrivate(&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, pScreen, bits); + dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), bits); } if (!(infoPtr->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h index d99355565..ab2c3b1e6 100644 --- a/hw/xnest/XNCursor.h +++ b/hw/xnest/XNCursor.h @@ -28,11 +28,11 @@ typedef struct { Cursor cursor; } xnestPrivCursor; -#define xnestGetCursorPriv(pCursor, pScreen) \ - ((xnestPrivCursor *)dixLookupPrivate(&(pCursor)->devPrivates, pScreen)) +#define xnestGetCursorPriv(pCursor, pScreen) ((xnestPrivCursor *) \ + dixLookupPrivate(&(pCursor)->devPrivates, CursorScreenKey(pScreen))) #define xnestSetCursorPriv(pCursor, pScreen, v) \ - dixSetPrivate(&(pCursor)->devPrivates, pScreen, v) + dixSetPrivate(&(pCursor)->devPrivates, CursorScreenKey(pScreen), v) #define xnestCursor(pCursor, pScreen) \ (xnestGetCursorPriv(pCursor, pScreen)->cursor) |