diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-09 11:23:53 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-11 17:24:19 +0930 |
commit | e083b5a07507d53de0d1d365ef1565346284c997 (patch) | |
tree | f205ca6aa8e5bf5db59ad74f4f197c54338260f7 /hw/xnest/Screen.c | |
parent | ea6a02c048e8589e99ee3b459f3612eb3d041558 (diff) |
xnest: wrap the xnest cursor sprite funcs around the mi funcs.
Modelled after the xfree86 code. Call miDCInitialize to init the SW rendering
engine, then take the pointers, store it in a xnest-local variable, and put
the xnest-specific sprite funcs in place. In the xnest sprite funcs, call
through to the mi sprite funcs after doing xnest-specific stuff.
Diffstat (limited to 'hw/xnest/Screen.c')
-rw-r--r-- | hw/xnest/Screen.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 9d157a3c6..1c129e703 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -41,9 +41,11 @@ is" without express or implied warranty. #include "Init.h" #include "mipointer.h" #include "Args.h" +#include "mipointrst.h" Window xnestDefaultWindows[MAXSCREENS]; Window xnestScreenSaverWindows[MAXSCREENS]; +DevPrivateKey xnestCursorScreenKey = &xnestCursorScreenKey; ScreenPtr xnestScreen(Window window) @@ -124,8 +126,8 @@ static miPointerSpriteFuncRec xnestPointerSpriteFuncs = xnestUnrealizeCursor, xnestSetCursor, xnestMoveCursor, - NULL, - NULL + xnestDeviceCursorInitialize, + xnestDeviceCursorCleanup }; Bool @@ -141,6 +143,7 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) XSizeHints sizeHints; VisualID defaultVisual; int rootDepth; + miPointerScreenPtr PointPriv; if (!dixRequestPrivate(xnestWindowPrivateKey, sizeof(xnestPrivWin))) return False; @@ -307,7 +310,11 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) pScreen->blockData = NULL; pScreen->wakeupData = NULL; - miDCInitialize (pScreen, &xnestPointerCursorFuncs); + miDCInitialize(pScreen, &xnestPointerCursorFuncs); /* init SW rendering */ + PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + xnestCursorFuncs.spriteFuncs = PointPriv->spriteFuncs; + dixSetPrivate(&pScreen->devPrivates, xnestCursorScreenKey, &xnestCursorFuncs); + PointPriv->spriteFuncs = &xnestPointerSpriteFuncs; pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay, DefaultScreen(xnestDisplay)) / |