aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xnest
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-14 14:23:04 +0000
committermarha <marha@users.sourceforge.net>2010-09-14 14:23:04 +0000
commit2ddb14008968ea365e3d395487cad2bfe154da9d (patch)
treef9d970e9dd6ee1ec835fedcadc15a8705a50e6d5 /xorg-server/hw/xnest
parentb7a6351e37e788bb25415dc79aaf2718b48d6939 (diff)
parent3815190d52f8ae453c2458335394eb5b18ab9bf5 (diff)
downloadvcxsrv-2ddb14008968ea365e3d395487cad2bfe154da9d.tar.gz
vcxsrv-2ddb14008968ea365e3d395487cad2bfe154da9d.tar.bz2
vcxsrv-2ddb14008968ea365e3d395487cad2bfe154da9d.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xnest')
-rw-r--r--xorg-server/hw/xnest/Color.c5
-rw-r--r--xorg-server/hw/xnest/Color.h113
-rw-r--r--xorg-server/hw/xnest/GC.c5
-rw-r--r--xorg-server/hw/xnest/Screen.c2
4 files changed, 61 insertions, 64 deletions
diff --git a/xorg-server/hw/xnest/Color.c b/xorg-server/hw/xnest/Color.c
index bb215fc45..2548f9495 100644
--- a/xorg-server/hw/xnest/Color.c
+++ b/xorg-server/hw/xnest/Color.c
@@ -34,6 +34,8 @@ is" without express or implied warranty.
#include "XNWindow.h"
#include "Args.h"
+DevPrivateKeyRec xnestColormapPrivateKeyRec;
+
static DevPrivateKeyRec cmapScrPrivateKeyRec;
#define cmapScrPrivateKey (&cmapScrPrivateKeyRec)
@@ -52,8 +54,6 @@ xnestCreateColormap(ColormapPtr pCmap)
pVisual = pCmap->pVisual;
ncolors = pVisual->ColormapEntries;
- pCmap->devPriv = (pointer)malloc(sizeof(xnestPrivColormap));
-
xnestColormapPriv(pCmap)->colormap =
XCreateColormap(xnestDisplay,
xnestDefaultWindows[pCmap->pScreen->myNum],
@@ -130,7 +130,6 @@ void
xnestDestroyColormap(ColormapPtr pCmap)
{
XFreeColormap(xnestDisplay, xnestColormap(pCmap));
- free(pCmap->devPriv);
}
#define SEARCH_PREDICATE \
diff --git a/xorg-server/hw/xnest/Color.h b/xorg-server/hw/xnest/Color.h
index f00bde47f..3c75fef2f 100644
--- a/xorg-server/hw/xnest/Color.h
+++ b/xorg-server/hw/xnest/Color.h
@@ -1,56 +1,57 @@
-/*
-
-Copyright 1993 by Davor Matic
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTCOLOR_H
-#define XNESTCOLOR_H
-
-#define DUMB_WINDOW_MANAGERS
-
-#define MAXCMAPS 1
-#define MINCMAPS 1
-
-typedef struct {
- Colormap colormap;
-} xnestPrivColormap;
-
-typedef struct {
- int numCmapIDs;
- Colormap *cmapIDs;
- int numWindows;
- Window *windows;
- int index;
-} xnestInstalledColormapWindows;
-
-#define xnestColormapPriv(pCmap) \
- ((xnestPrivColormap *)((pCmap)->devPriv))
-
-#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
-
-#define xnestPixel(pixel) (pixel)
-
-Bool xnestCreateColormap(ColormapPtr pCmap);
-void xnestDestroyColormap(ColormapPtr pCmap);
-void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
-void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
-void xnestDirectInstallColormaps(ScreenPtr pScreen);
-void xnestDirectUninstallColormaps(ScreenPtr pScreen);
-void xnestInstallColormap(ColormapPtr pCmap);
-void xnestUninstallColormap(ColormapPtr pCmap);
-int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIDs);
-void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors);
-void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
- unsigned short *pBlue, VisualPtr pVisual);
-Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
-
-#endif /* XNESTCOLOR_H */
+/*
+
+Copyright 1993 by Davor Matic
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. Davor Matic makes no representations about
+the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+*/
+
+#ifndef XNESTCOLOR_H
+#define XNESTCOLOR_H
+
+#define DUMB_WINDOW_MANAGERS
+
+#define MAXCMAPS 1
+#define MINCMAPS 1
+
+typedef struct {
+ Colormap colormap;
+} xnestPrivColormap;
+
+typedef struct {
+ int numCmapIDs;
+ Colormap *cmapIDs;
+ int numWindows;
+ Window *windows;
+ int index;
+} xnestInstalledColormapWindows;
+
+extern DevPrivateKeyRec xnestColormapPrivateKeyRec;
+#define xnestColormapPriv(pCmap) \
+ ((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec))
+
+#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
+
+#define xnestPixel(pixel) (pixel)
+
+Bool xnestCreateColormap(ColormapPtr pCmap);
+void xnestDestroyColormap(ColormapPtr pCmap);
+void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
+void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
+void xnestDirectInstallColormaps(ScreenPtr pScreen);
+void xnestDirectUninstallColormaps(ScreenPtr pScreen);
+void xnestInstallColormap(ColormapPtr pCmap);
+void xnestUninstallColormap(ColormapPtr pCmap);
+int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIDs);
+void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors);
+void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
+ unsigned short *pBlue, VisualPtr pVisual);
+Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
+
+#endif /* XNESTCOLOR_H */
diff --git a/xorg-server/hw/xnest/GC.c b/xorg-server/hw/xnest/GC.c
index 3c0074cc9..0aaef6904 100644
--- a/xorg-server/hw/xnest/GC.c
+++ b/xorg-server/hw/xnest/GC.c
@@ -73,9 +73,6 @@ static GCOps xnestOps = {
Bool
xnestCreateGC(GCPtr pGC)
{
- pGC->clientClipType = CT_NONE;
- pGC->clientClip = NULL;
-
pGC->funcs = &xnestFuncs;
pGC->ops = &xnestOps;
@@ -92,8 +89,6 @@ xnestCreateGC(GCPtr pGC)
void
xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
{
- pGC->lastWinOrg.x = pDrawable->x;
- pGC->lastWinOrg.y = pDrawable->y;
}
void
diff --git a/xorg-server/hw/xnest/Screen.c b/xorg-server/hw/xnest/Screen.c
index cf225d0ab..f4e5cbd0a 100644
--- a/xorg-server/hw/xnest/Screen.c
+++ b/xorg-server/hw/xnest/Screen.c
@@ -151,6 +151,8 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
return FALSE;
if (!dixRegisterPrivateKey(&xnestPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof (xnestPrivPixmap)))
return FALSE;
+ if (!dixRegisterPrivateKey(&xnestColormapPrivateKeyRec, PRIVATE_COLORMAP, sizeof (xnestPrivColormap)))
+ return FALSE;
if (!dixRegisterPrivateKey(&xnestCursorScreenKeyRec, PRIVATE_SCREEN, 0))
return FALSE;