aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xnest/Screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xnest/Screen.c')
-rw-r--r--xorg-server/hw/xnest/Screen.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/xorg-server/hw/xnest/Screen.c b/xorg-server/hw/xnest/Screen.c
index 61a325f3c..ca903d7ac 100644
--- a/xorg-server/hw/xnest/Screen.c
+++ b/xorg-server/hw/xnest/Screen.c
@@ -41,9 +41,12 @@ is" without express or implied warranty.
#include "Init.h"
#include "mipointer.h"
#include "Args.h"
+#include "mipointrst.h"
Window xnestDefaultWindows[MAXSCREENS];
Window xnestScreenSaverWindows[MAXSCREENS];
+static int xnestCursorScreenKeyIndex;
+DevPrivateKey xnestCursorScreenKey = &xnestCursorScreenKeyIndex;
ScreenPtr
xnestScreen(Window window)
@@ -124,6 +127,8 @@ static miPointerSpriteFuncRec xnestPointerSpriteFuncs =
xnestUnrealizeCursor,
xnestSetCursor,
xnestMoveCursor,
+ xnestDeviceCursorInitialize,
+ xnestDeviceCursorCleanup
};
Bool
@@ -139,13 +144,12 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
XSizeHints sizeHints;
VisualID defaultVisual;
int rootDepth;
+ miPointerScreenPtr PointPriv;
if (!dixRequestPrivate(xnestWindowPrivateKey, sizeof(xnestPrivWin)))
return False;
if (!dixRequestPrivate(xnestGCPrivateKey, sizeof(xnestPrivGC)))
return False;
- if (!dixRequestPrivate(xnestPixmapPrivateKey, sizeof (xnestPrivPixmap)))
- return False;
visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec));
numVisuals = 0;
@@ -305,8 +309,11 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
pScreen->blockData = NULL;
pScreen->wakeupData = NULL;
- miPointerInitialize (pScreen, &xnestPointerSpriteFuncs,
- &xnestPointerCursorFuncs, True);
+ 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)) /
@@ -323,10 +330,8 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
if (!miScreenDevPrivateInit(pScreen, xnestWidth, NULL))
return FALSE;
-#ifdef SHAPE
/* overwrite miSetShape with our own */
pScreen->SetShape = xnestSetShape;
-#endif /* SHAPE */
/* devPrivates */