mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-25 01:49:58 +00:00
devPrivates rework: convert CursorRec and CursorBits over to new interface.
This commit is contained in:
parent
4795df6245
commit
47ab4d648b
14 changed files with 75 additions and 51 deletions
|
|
@ -104,8 +104,8 @@ xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
bg_color.green = pCursor->backGreen;
|
||||
bg_color.blue = pCursor->backBlue;
|
||||
|
||||
pCursor->devPriv[pScreen->myNum] = (pointer)xalloc(sizeof(xnestPrivCursor));
|
||||
xnestCursorPriv(pCursor, pScreen)->cursor =
|
||||
xnestSetCursorPriv(pCursor, pScreen, xalloc(sizeof(xnestPrivCursor)));
|
||||
xnestCursor(pCursor, pScreen) =
|
||||
XCreatePixmapCursor(xnestDisplay, source, mask, &fg_color, &bg_color,
|
||||
pCursor->bits->xhot, pCursor->bits->yhot);
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ Bool
|
|||
xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
||||
{
|
||||
XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen));
|
||||
xfree(xnestCursorPriv(pCursor, pScreen));
|
||||
xfree(xnestGetCursorPriv(pCursor, pScreen));
|
||||
return True;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,14 @@ typedef struct {
|
|||
Cursor cursor;
|
||||
} xnestPrivCursor;
|
||||
|
||||
#define xnestCursorPriv(pCursor, pScreen) \
|
||||
((xnestPrivCursor *)((pCursor)->devPriv[pScreen->myNum]))
|
||||
#define xnestGetCursorPriv(pCursor, pScreen) \
|
||||
((xnestPrivCursor *)dixLookupPrivate(&(pCursor)->devPrivates, pScreen))
|
||||
|
||||
#define xnestSetCursorPriv(pCursor, pScreen, v) \
|
||||
dixSetPrivate(&(pCursor)->devPrivates, pScreen, v)
|
||||
|
||||
#define xnestCursor(pCursor, pScreen) \
|
||||
(xnestCursorPriv(pCursor, pScreen)->cursor)
|
||||
(xnestGetCursorPriv(pCursor, pScreen)->cursor)
|
||||
|
||||
Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
|
||||
Bool xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
|
||||
|
|
|
|||
Loading…
Reference in a new issue