summaryrefslogtreecommitdiff
path: root/hw/xnest/Screen.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2004-08-11 22:40:14 +0000
committerKeith Packard <keithp@keithp.com>2004-08-11 22:40:14 +0000
commitfd439afdfe7ba451aff19b62d1764e4dfd0b782f (patch)
treeef70f8b2e726f132b3fe089f6fc02f5770149517 /hw/xnest/Screen.c
parentf95293e5253904883d3b40f9e68e6175247754a3 (diff)
Add COMPOSITE change to fbCopyWindow (not needed yet)
Xnest was half-using midispcur and doing a bad job of it. Replace all of that code with mipointer which does a lot of the work. Support DDXen which don't provide GetWindowPixmap, or which return NULL for the root pixmap.
Diffstat (limited to 'hw/xnest/Screen.c')
-rw-r--r--hw/xnest/Screen.c65
1 files changed, 33 insertions, 32 deletions
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 3412edfb8..8490a7995 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -124,6 +124,14 @@ static miPointerScreenFuncRec xnestPointerCursorFuncs =
miPointerWarpCursor
};
+static miPointerSpriteFuncRec xnestPointerSpriteFuncs =
+{
+ xnestRealizeCursor,
+ xnestUnrealizeCursor,
+ xnestSetCursor,
+ xnestMoveCursor,
+};
+
Bool
xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
{
@@ -241,27 +249,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
xnestHeight = gattributes.height;
}
- /* myNum */
- /* id */
- miScreenInit(pScreen, NULL, xnestWidth, xnestHeight, 1, 1, xnestWidth,
- rootDepth,
- numDepths, depths,
- defaultVisual, /* root visual */
- numVisuals, visuals);
-
- miInitializeBackingStore(pScreen);
-
- miDCInitialize(pScreen, &xnestPointerCursorFuncs);
-
- pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay,
- DefaultScreen(xnestDisplay)) /
- DisplayWidth(xnestDisplay,
- DefaultScreen(xnestDisplay));
- pScreen->mmHeight = xnestHeight * DisplayHeightMM(xnestDisplay,
- DefaultScreen(xnestDisplay)) /
- DisplayHeight(xnestDisplay,
- DefaultScreen(xnestDisplay));
-
pScreen->defColormap = (Colormap) FakeClientID(0);
pScreen->minInstalledCmaps = MINCMAPS;
pScreen->maxInstalledCmaps = MAXCMAPS;
@@ -282,7 +269,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
/* Random screen procedures */
- pScreen->CloseScreen = xnestCloseScreen;
pScreen->QueryBestSize = xnestQueryBestSize;
pScreen->SaveScreen = xnestSaveScreen;
pScreen->GetImage = xnestGetImage;
@@ -324,16 +310,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
pScreen->RealizeFont = xnestRealizeFont;
pScreen->UnrealizeFont = xnestUnrealizeFont;
- /* Cursor Procedures */
-
- pScreen->ConstrainCursor = xnestConstrainCursor;
- pScreen->CursorLimits = xnestCursorLimits;
- pScreen->DisplayCursor = xnestDisplayCursor;
- pScreen->RealizeCursor = xnestRealizeCursor;
- pScreen->UnrealizeCursor = xnestUnrealizeCursor;
- pScreen->RecolorCursor = xnestRecolorCursor;
- pScreen->SetCursorPosition = xnestSetCursorPosition;
-
/* GC procedures */
pScreen->CreateGC = xnestCreateGC;
@@ -356,6 +332,31 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr)NoopDDA;
pScreen->blockData = NULL;
pScreen->wakeupData = NULL;
+ /* myNum */
+ /* id */
+ miScreenInit(pScreen, NULL, xnestWidth, xnestHeight, 1, 1, xnestWidth,
+ rootDepth,
+ numDepths, depths,
+ defaultVisual, /* root visual */
+ numVisuals, visuals);
+
+/* miInitializeBackingStore(pScreen); */
+
+ miPointerInitialize (pScreen, &xnestPointerSpriteFuncs,
+ &xnestPointerCursorFuncs, True);
+
+ pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay,
+ DefaultScreen(xnestDisplay)) /
+ DisplayWidth(xnestDisplay,
+ DefaultScreen(xnestDisplay));
+ pScreen->mmHeight = xnestHeight * DisplayHeightMM(xnestDisplay,
+ DefaultScreen(xnestDisplay)) /
+ DisplayHeight(xnestDisplay,
+ DefaultScreen(xnestDisplay));
+
+ /* overwrite miCloseScreen with our own */
+ pScreen->CloseScreen = xnestCloseScreen;
+
if (!miScreenDevPrivateInit(pScreen, xnestWidth, NULL))
return FALSE;