aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/dmxscrinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/dmx/dmxscrinit.c')
-rw-r--r--xorg-server/hw/dmx/dmxscrinit.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/xorg-server/hw/dmx/dmxscrinit.c b/xorg-server/hw/dmx/dmxscrinit.c
index 1d12ec32d..28c8b0185 100644
--- a/xorg-server/hw/dmx/dmxscrinit.c
+++ b/xorg-server/hw/dmx/dmxscrinit.c
@@ -61,21 +61,34 @@
#include "mipointer.h"
#include "micmap.h"
+#undef Xmalloc
+#undef Xcalloc
+#undef Xrealloc
+#undef Xfree
+
+
extern Bool dmxCloseScreen(int idx, ScreenPtr pScreen);
static Bool dmxSaveScreen(ScreenPtr pScreen, int what);
static unsigned long dmxGeneration;
static unsigned long *dmxCursorGeneration;
+static int dmxGCPrivateKeyIndex;
DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKey; /**< Private index for GCs */
-DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKey; /**< Private index for Windows */
-DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKey; /**< Private index for Pixmaps */
+static int dmxWinPrivateKeyIndex;
+DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKeyIndex; /**< Private index for Windows */
+static int dmxPixPrivateKeyIndex;
+DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKeyIndex; /**< Private index for Pixmaps */
int dmxFontPrivateIndex; /**< Private index for Fonts */
-DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKey; /**< Private index for Screens */
-DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKey; /**< Private index for Colormaps */
+static int dmxScreenPrivateKeyIndex;
+DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKeyIndex; /**< Private index for Screens */
+static int dmxColormapPrivateKeyIndex;
+DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKeyIndex; /**< Private index for Colormaps */
#ifdef RENDER
-DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKey; /**< Private index for Picts */
-DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKey; /**< Private index for GlyphSets */
+static int dmxPictPrivateKeyIndex;
+DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKeyIndex; /**< Private index for Picts */
+static int dmxGlyphSetPrivateKeyIndex;
+DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKeyIndex; /**< Private index for GlyphSets */
#endif
/** Initialize the parts of screen \a idx that require access to the
@@ -340,10 +353,8 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
DMX_WRAP(InstallColormap, dmxInstallColormap, dmxScreen, pScreen);
DMX_WRAP(StoreColors, dmxStoreColors, dmxScreen, pScreen);
-#ifdef SHAPE
/* Wrap Shape functions */
DMX_WRAP(SetShape, dmxSetShape, dmxScreen, pScreen);
-#endif
}
if (!dmxCreateDefColormap(pScreen))
@@ -434,10 +445,8 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen)
xfree(dmxScreen->shadow);
} else {
-#ifdef SHAPE
/* Unwrap Shape functions */
DMX_UNWRAP(SetShape, dmxScreen, pScreen);
-#endif
/* Unwrap the pScreen functions */
DMX_UNWRAP(CreateGC, dmxScreen, pScreen);