aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xnest
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-16 09:37:37 +0200
committermarha <marha@users.sourceforge.net>2012-04-16 09:43:48 +0200
commit00eae6f01bf11ec6a90dfc68e607b6a1a250a118 (patch)
treeb814d518076840b7433d02bc3b5957c1dd54de25 /xorg-server/hw/xnest
parenta50d2ee664302147942dd5ed6428f9bab9d4e76a (diff)
parentd6d3999ccb2cb72d55820770260172eccbbb68d7 (diff)
downloadvcxsrv-00eae6f01bf11ec6a90dfc68e607b6a1a250a118.tar.gz
vcxsrv-00eae6f01bf11ec6a90dfc68e607b6a1a250a118.tar.bz2
vcxsrv-00eae6f01bf11ec6a90dfc68e607b6a1a250a118.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/Xext/securitysrv.h xorg-server/glx/glxext.h xorg-server/glx/indirect_reqsize.c xorg-server/glx/indirect_size_get.c xorg-server/hw/xwin/winclip.c xorg-server/hw/xwin/winfont.c xorg-server/hw/xwin/winglobals.c xorg-server/hw/xwin/winglobals.h xorg-server/hw/xwin/winmonitors.h xorg-server/include/closestr.h xorg-server/include/pixmapstr.h xorg-server/include/servermd.h xorg-server/include/site.h xorg-server/include/windowstr.h xorg-server/include/xkbstr.h
Diffstat (limited to 'xorg-server/hw/xnest')
-rw-r--r--xorg-server/hw/xnest/Args.h20
-rw-r--r--xorg-server/hw/xnest/Color.h115
-rw-r--r--xorg-server/hw/xnest/Display.h8
-rw-r--r--xorg-server/hw/xnest/Drawable.h52
-rw-r--r--xorg-server/hw/xnest/Events.h2
-rw-r--r--xorg-server/hw/xnest/Handlers.c6
-rw-r--r--xorg-server/hw/xnest/Handlers.h4
-rw-r--r--xorg-server/hw/xnest/Init.h2
-rw-r--r--xorg-server/hw/xnest/Keyboard.h4
-rw-r--r--xorg-server/hw/xnest/Pixmap.c162
-rw-r--r--xorg-server/hw/xnest/Pointer.h4
-rw-r--r--xorg-server/hw/xnest/Screen.h2
-rw-r--r--xorg-server/hw/xnest/Visual.c50
-rw-r--r--xorg-server/hw/xnest/Visual.h4
-rw-r--r--xorg-server/hw/xnest/XNFont.h4
-rw-r--r--xorg-server/hw/xnest/XNGC.h5
-rw-r--r--xorg-server/hw/xnest/XNPixmap.h75
-rw-r--r--xorg-server/hw/xnest/XNWindow.h147
-rw-r--r--xorg-server/hw/xnest/Xnest.h8
-rw-r--r--xorg-server/hw/xnest/xnest-config.h2
20 files changed, 338 insertions, 338 deletions
diff --git a/xorg-server/hw/xnest/Args.h b/xorg-server/hw/xnest/Args.h
index c3002bfca..514a39513 100644
--- a/xorg-server/hw/xnest/Args.h
+++ b/xorg-server/hw/xnest/Args.h
@@ -15,24 +15,24 @@ is" without express or implied warranty.
#ifndef XNESTARGC_H
#define XNESTARGS_H
-extern char *xnestDisplayName;
+extern char *xnestDisplayName;
extern Bool xnestSynchronize;
extern Bool xnestFullGeneration;
-extern int xnestDefaultClass;
+extern int xnestDefaultClass;
extern Bool xnestUserDefaultClass;
-extern int xnestDefaultDepth;
+extern int xnestDefaultDepth;
extern Bool xnestUserDefaultDepth;
extern Bool xnestSoftwareScreenSaver;
-extern int xnestX;
-extern int xnestY;
-extern unsigned int xnestWidth;
-extern unsigned int xnestHeight;
+extern int xnestX;
+extern int xnestY;
+extern unsigned int xnestWidth;
+extern unsigned int xnestHeight;
extern int xnestUserGeometry;
-extern int xnestBorderWidth;
+extern int xnestBorderWidth;
extern Bool xnestUserBorderWidth;
-extern char *xnestWindowName;
+extern char *xnestWindowName;
extern int xnestNumScreens;
extern Bool xnestDoDirectColormaps;
extern Window xnestParentWindow;
-#endif /* XNESTARGS_H */
+#endif /* XNESTARGS_H */
diff --git a/xorg-server/hw/xnest/Color.h b/xorg-server/hw/xnest/Color.h
index 3c75fef2f..2c4e0be2a 100644
--- a/xorg-server/hw/xnest/Color.h
+++ b/xorg-server/hw/xnest/Color.h
@@ -1,57 +1,58 @@
-/*
-
-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 */
+/*
+
+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/Display.h b/xorg-server/hw/xnest/Display.h
index d0eefd57c..4e9dbf463 100644
--- a/xorg-server/hw/xnest/Display.h
+++ b/xorg-server/hw/xnest/Display.h
@@ -21,7 +21,7 @@ is" without express or implied warranty.
#define MAXVISUALSPERDEPTH 256
extern Display *xnestDisplay;
-extern XVisualInfo *xnestVisuals;
+extern XVisualInfo *xnestVisuals;
extern int xnestNumVisuals;
extern int xnestDefaultVisualIndex;
extern Colormap *xnestDefaultColormaps;
@@ -30,8 +30,8 @@ extern int *xnestDepths;
extern int xnestNumDepths;
extern XPixmapFormatValues *xnestPixmapFormats;
extern int xnestNumPixmapFormats;
-extern Pixel xnestBlackPixel;
-extern Pixel xnestWhitePixel;
+extern Pixel xnestBlackPixel;
+extern Pixel xnestWhitePixel;
extern Drawable xnestDefaultDrawables[MAXDEPTH + 1];
extern Pixmap xnestIconBitmap;
extern Pixmap xnestScreenSaverPixmap;
@@ -41,4 +41,4 @@ extern unsigned long xnestEventMask;
void xnestOpenDisplay(int argc, char *argv[]);
void xnestCloseDisplay(void);
-#endif /* XNESTCOMMON_H */
+#endif /* XNESTCOMMON_H */
diff --git a/xorg-server/hw/xnest/Drawable.h b/xorg-server/hw/xnest/Drawable.h
index 7f742cb1f..ea7b5bb21 100644
--- a/xorg-server/hw/xnest/Drawable.h
+++ b/xorg-server/hw/xnest/Drawable.h
@@ -1,26 +1,26 @@
-/*
-
-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 XNESTDRAWABLE_H
-#define XNESTDRAWABLE_H
-
-#include "XNWindow.h"
-#include "XNPixmap.h"
-
-#define xnestDrawable(pDrawable) \
- (WindowDrawable((pDrawable)->type) ? \
- xnestWindow((WindowPtr)pDrawable) : \
- xnestPixmap((PixmapPtr)pDrawable))
-
-#endif /* XNESTDRAWABLE_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 XNESTDRAWABLE_H
+#define XNESTDRAWABLE_H
+
+#include "XNWindow.h"
+#include "XNPixmap.h"
+
+#define xnestDrawable(pDrawable) \
+ (WindowDrawable((pDrawable)->type) ? \
+ xnestWindow((WindowPtr)pDrawable) : \
+ xnestPixmap((PixmapPtr)pDrawable))
+
+#endif /* XNESTDRAWABLE_H */
diff --git a/xorg-server/hw/xnest/Events.h b/xorg-server/hw/xnest/Events.h
index 2441accd5..1c1b8cd46 100644
--- a/xorg-server/hw/xnest/Events.h
+++ b/xorg-server/hw/xnest/Events.h
@@ -26,4 +26,4 @@ void xnestCollectExposures(void);
void xnestCollectEvents(void);
void xnestQueueKeyEvent(int type, unsigned int keycode);
-#endif /* XNESTEVENTS_H */
+#endif /* XNESTEVENTS_H */
diff --git a/xorg-server/hw/xnest/Handlers.c b/xorg-server/hw/xnest/Handlers.c
index a113f488a..4605b90bd 100644
--- a/xorg-server/hw/xnest/Handlers.c
+++ b/xorg-server/hw/xnest/Handlers.c
@@ -34,12 +34,12 @@ is" without express or implied warranty.
void
xnestBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask)
{
- xnestCollectExposures();
- XFlush(xnestDisplay);
+ xnestCollectExposures();
+ XFlush(xnestDisplay);
}
void
xnestWakeupHandler(pointer blockData, int result, pointer pReadMask)
{
- xnestCollectEvents();
+ xnestCollectEvents();
}
diff --git a/xorg-server/hw/xnest/Handlers.h b/xorg-server/hw/xnest/Handlers.h
index 16228a0c1..7160bdd13 100644
--- a/xorg-server/hw/xnest/Handlers.h
+++ b/xorg-server/hw/xnest/Handlers.h
@@ -16,7 +16,7 @@ is" without express or implied warranty.
#define XNESTHANDLERS_H
void xnestBlockHandler(pointer blockData, OSTimePtr pTimeout,
- pointer pReadMask);
+ pointer pReadMask);
void xnestWakeupHandler(pointer blockData, int result, pointer pReadMask);
-#endif /* XNESTHANDLERS_H */
+#endif /* XNESTHANDLERS_H */
diff --git a/xorg-server/hw/xnest/Init.h b/xorg-server/hw/xnest/Init.h
index 4bed0ee67..7c0291ebf 100644
--- a/xorg-server/hw/xnest/Init.h
+++ b/xorg-server/hw/xnest/Init.h
@@ -17,4 +17,4 @@ is" without express or implied warranty.
extern Bool xnestDoFullGeneration;
-#endif /* XNESTINIT_H */
+#endif /* XNESTINIT_H */
diff --git a/xorg-server/hw/xnest/Keyboard.h b/xorg-server/hw/xnest/Keyboard.h
index 546a1cbe4..45d56bc08 100644
--- a/xorg-server/hw/xnest/Keyboard.h
+++ b/xorg-server/hw/xnest/Keyboard.h
@@ -21,8 +21,8 @@ is" without express or implied warranty.
extern DeviceIntPtr xnestKeyboardDevice;
void xnestBell(int volume, DeviceIntPtr pDev, pointer ctrl, int cls);
-void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl);
+void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl * ctrl);
int xnestKeyboardProc(DeviceIntPtr pDev, int onoff);
void xnestUpdateModifierState(unsigned int state);
-#endif /* XNESTKEYBOARD_H */
+#endif /* XNESTKEYBOARD_H */
diff --git a/xorg-server/hw/xnest/Pixmap.c b/xorg-server/hw/xnest/Pixmap.c
index eccf56986..13e1610fd 100644
--- a/xorg-server/hw/xnest/Pixmap.c
+++ b/xorg-server/hw/xnest/Pixmap.c
@@ -36,101 +36,101 @@ DevPrivateKeyRec xnestPixmapPrivateKeyRec;
PixmapPtr
xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint)
+ unsigned usage_hint)
{
- PixmapPtr pPixmap;
-
- pPixmap = AllocatePixmap(pScreen, 0);
- if (!pPixmap)
- return NullPixmap;
- pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = 0;
- pPixmap->drawable.depth = depth;
- pPixmap->drawable.bitsPerPixel = depth;
- pPixmap->drawable.id = 0;
- pPixmap->drawable.x = 0;
- pPixmap->drawable.y = 0;
- pPixmap->drawable.width = width;
- pPixmap->drawable.height = height;
- pPixmap->drawable.pScreen = pScreen;
- pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pPixmap->refcnt = 1;
- pPixmap->devKind = PixmapBytePad(width, depth);
- pPixmap->usage_hint = usage_hint;
- if (width && height)
- xnestPixmapPriv(pPixmap)->pixmap =
- XCreatePixmap(xnestDisplay,
- xnestDefaultWindows[pScreen->myNum],
- width, height, depth);
- else
- xnestPixmapPriv(pPixmap)->pixmap = 0;
-
- return pPixmap;
+ PixmapPtr pPixmap;
+
+ pPixmap = AllocatePixmap(pScreen, 0);
+ if (!pPixmap)
+ return NullPixmap;
+ pPixmap->drawable.type = DRAWABLE_PIXMAP;
+ pPixmap->drawable.class = 0;
+ pPixmap->drawable.depth = depth;
+ pPixmap->drawable.bitsPerPixel = depth;
+ pPixmap->drawable.id = 0;
+ pPixmap->drawable.x = 0;
+ pPixmap->drawable.y = 0;
+ pPixmap->drawable.width = width;
+ pPixmap->drawable.height = height;
+ pPixmap->drawable.pScreen = pScreen;
+ pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ pPixmap->refcnt = 1;
+ pPixmap->devKind = PixmapBytePad(width, depth);
+ pPixmap->usage_hint = usage_hint;
+ if (width && height)
+ xnestPixmapPriv(pPixmap)->pixmap =
+ XCreatePixmap(xnestDisplay,
+ xnestDefaultWindows[pScreen->myNum],
+ width, height, depth);
+ else
+ xnestPixmapPriv(pPixmap)->pixmap = 0;
+
+ return pPixmap;
}
Bool
xnestDestroyPixmap(PixmapPtr pPixmap)
{
- if(--pPixmap->refcnt)
+ if (--pPixmap->refcnt)
+ return TRUE;
+ XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
+ FreePixmap(pPixmap);
return TRUE;
- XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
- FreePixmap(pPixmap);
- return TRUE;
}
RegionPtr
xnestPixmapToRegion(PixmapPtr pPixmap)
{
- XImage *ximage;
- register RegionPtr pReg, pTmpReg;
- register int x, y;
- unsigned long previousPixel, currentPixel;
- BoxRec Box = { 0, 0, 0, 0 };
- Bool overlap;
-
- ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
- pPixmap->drawable.width, pPixmap->drawable.height,
- 1, XYPixmap);
-
- pReg = RegionCreate(NULL, 1);
- pTmpReg = RegionCreate(NULL, 1);
- if(!pReg || !pTmpReg) {
- XDestroyImage(ximage);
- return NullRegion;
- }
-
- for (y = 0; y < pPixmap->drawable.height; y++) {
- Box.y1 = y;
- Box.y2 = y + 1;
- previousPixel = 0L;
- for (x = 0; x < pPixmap->drawable.width; x++) {
- currentPixel = XGetPixel(ximage, x, y);
- if (previousPixel != currentPixel) {
- if (previousPixel == 0L) {
- /* left edge */
- Box.x1 = x;
- }
- else if (currentPixel == 0L) {
- /* right edge */
- Box.x2 = x;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
- }
- previousPixel = currentPixel;
- }
+ XImage *ximage;
+ register RegionPtr pReg, pTmpReg;
+ register int x, y;
+ unsigned long previousPixel, currentPixel;
+ BoxRec Box = { 0, 0, 0, 0 };
+ Bool overlap;
+
+ ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
+ pPixmap->drawable.width, pPixmap->drawable.height,
+ 1, XYPixmap);
+
+ pReg = RegionCreate(NULL, 1);
+ pTmpReg = RegionCreate(NULL, 1);
+ if (!pReg || !pTmpReg) {
+ XDestroyImage(ximage);
+ return NullRegion;
}
- if (previousPixel != 0L) {
- /* right edge because of the end of pixmap */
- Box.x2 = pPixmap->drawable.width;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
+
+ for (y = 0; y < pPixmap->drawable.height; y++) {
+ Box.y1 = y;
+ Box.y2 = y + 1;
+ previousPixel = 0L;
+ for (x = 0; x < pPixmap->drawable.width; x++) {
+ currentPixel = XGetPixel(ximage, x, y);
+ if (previousPixel != currentPixel) {
+ if (previousPixel == 0L) {
+ /* left edge */
+ Box.x1 = x;
+ }
+ else if (currentPixel == 0L) {
+ /* right edge */
+ Box.x2 = x;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
+ previousPixel = currentPixel;
+ }
+ }
+ if (previousPixel != 0L) {
+ /* right edge because of the end of pixmap */
+ Box.x2 = pPixmap->drawable.width;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
}
- }
-
- RegionDestroy(pTmpReg);
- XDestroyImage(ximage);
- RegionValidate(pReg, &overlap);
+ RegionDestroy(pTmpReg);
+ XDestroyImage(ximage);
+
+ RegionValidate(pReg, &overlap);
- return pReg;
+ return pReg;
}
diff --git a/xorg-server/hw/xnest/Pointer.h b/xorg-server/hw/xnest/Pointer.h
index 890726f55..d0047c517 100644
--- a/xorg-server/hw/xnest/Pointer.h
+++ b/xorg-server/hw/xnest/Pointer.h
@@ -23,7 +23,7 @@ is" without express or implied warranty.
extern DeviceIntPtr xnestPointerDevice;
-void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl);
+void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl * ctrl);
int xnestPointerProc(DeviceIntPtr pDev, int onoff);
-#endif /* XNESTPOINTER_H */
+#endif /* XNESTPOINTER_H */
diff --git a/xorg-server/hw/xnest/Screen.h b/xorg-server/hw/xnest/Screen.h
index b113c6460..1d255d79b 100644
--- a/xorg-server/hw/xnest/Screen.h
+++ b/xorg-server/hw/xnest/Screen.h
@@ -22,4 +22,4 @@ ScreenPtr xnestScreen(Window window);
Bool xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]);
Bool xnestCloseScreen(int index, ScreenPtr pScreen);
-#endif /* XNESTSCREEN_H */
+#endif /* XNESTSCREEN_H */
diff --git a/xorg-server/hw/xnest/Visual.c b/xorg-server/hw/xnest/Visual.c
index da1d63c10..63198ba4f 100644
--- a/xorg-server/hw/xnest/Visual.c
+++ b/xorg-server/hw/xnest/Visual.c
@@ -30,41 +30,41 @@ is" without express or implied warranty.
Visual *
xnestVisual(VisualPtr pVisual)
{
- int i;
+ int i;
- for (i = 0; i < xnestNumVisuals; i++)
- if (pVisual->class == xnestVisuals[i].class &&
- pVisual->bitsPerRGBValue == xnestVisuals[i].bits_per_rgb &&
- pVisual->ColormapEntries == xnestVisuals[i].colormap_size &&
- pVisual->nplanes == xnestVisuals[i].depth &&
- pVisual->redMask == xnestVisuals[i].red_mask &&
- pVisual->greenMask == xnestVisuals[i].green_mask &&
- pVisual->blueMask == xnestVisuals[i].blue_mask)
- return xnestVisuals[i].visual;
+ for (i = 0; i < xnestNumVisuals; i++)
+ if (pVisual->class == xnestVisuals[i].class &&
+ pVisual->bitsPerRGBValue == xnestVisuals[i].bits_per_rgb &&
+ pVisual->ColormapEntries == xnestVisuals[i].colormap_size &&
+ pVisual->nplanes == xnestVisuals[i].depth &&
+ pVisual->redMask == xnestVisuals[i].red_mask &&
+ pVisual->greenMask == xnestVisuals[i].green_mask &&
+ pVisual->blueMask == xnestVisuals[i].blue_mask)
+ return xnestVisuals[i].visual;
- return NULL;
+ return NULL;
}
Visual *
xnestVisualFromID(ScreenPtr pScreen, VisualID visual)
{
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == visual)
- return xnestVisual(&pScreen->visuals[i]);
+ int i;
- return NULL;
+ for (i = 0; i < pScreen->numVisuals; i++)
+ if (pScreen->visuals[i].vid == visual)
+ return xnestVisual(&pScreen->visuals[i]);
+
+ return NULL;
}
Colormap
-xnestDefaultVisualColormap(Visual *visual)
+xnestDefaultVisualColormap(Visual * visual)
{
- int i;
-
- for (i = 0; i < xnestNumVisuals; i++)
- if (xnestVisuals[i].visual == visual)
- return xnestDefaultColormaps[i];
-
- return None;
+ int i;
+
+ for (i = 0; i < xnestNumVisuals; i++)
+ if (xnestVisuals[i].visual == visual)
+ return xnestDefaultColormaps[i];
+
+ return None;
}
diff --git a/xorg-server/hw/xnest/Visual.h b/xorg-server/hw/xnest/Visual.h
index 1bd203709..c3ae8a19f 100644
--- a/xorg-server/hw/xnest/Visual.h
+++ b/xorg-server/hw/xnest/Visual.h
@@ -17,9 +17,9 @@ is" without express or implied warranty.
Visual *xnestVisual(VisualPtr pVisual);
Visual *xnestVisualFromID(ScreenPtr pScreen, VisualID visual);
-Colormap xnestDefaultVisualColormap(Visual *visual);
+Colormap xnestDefaultVisualColormap(Visual * visual);
#define xnestDefaultVisual(pScreen) \
xnestVisualFromID((pScreen), (pScreen)->rootVisual)
-#endif /* XNESTVISUAL_H */
+#endif /* XNESTVISUAL_H */
diff --git a/xorg-server/hw/xnest/XNFont.h b/xorg-server/hw/xnest/XNFont.h
index 92c112f36..a210b1790 100644
--- a/xorg-server/hw/xnest/XNFont.h
+++ b/xorg-server/hw/xnest/XNFont.h
@@ -16,7 +16,7 @@ is" without express or implied warranty.
#define XNESTFONT_H
typedef struct {
- XFontStruct *font_struct;
+ XFontStruct *font_struct;
} xnestPrivFont;
extern int xnestFontPrivateIndex;
@@ -31,4 +31,4 @@ extern int xnestFontPrivateIndex;
Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont);
Bool xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
-#endif /* XNESTFONT_H */
+#endif /* XNESTFONT_H */
diff --git a/xorg-server/hw/xnest/XNGC.h b/xorg-server/hw/xnest/XNGC.h
index c4a6cef77..c7c25e426 100644
--- a/xorg-server/hw/xnest/XNGC.h
+++ b/xorg-server/hw/xnest/XNGC.h
@@ -18,10 +18,11 @@ is" without express or implied warranty.
/* This file uses the GC definition form Xlib.h as XlibGC. */
typedef struct {
- XlibGC gc;
+ XlibGC gc;
} xnestPrivGC;
extern DevPrivateKeyRec xnestGCPrivateKeyRec;
+
#define xnestGCPrivateKey (&xnestGCPrivateKeyRec)
#define xnestGCPriv(pGC) ((xnestPrivGC *) \
@@ -39,4 +40,4 @@ void xnestDestroyClip(GCPtr pGC);
void xnestDestroyClipHelper(GCPtr pGC);
void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
-#endif /* XNESTGC_H */
+#endif /* XNESTGC_H */
diff --git a/xorg-server/hw/xnest/XNPixmap.h b/xorg-server/hw/xnest/XNPixmap.h
index 0d7c6b61e..268ba1e8b 100644
--- a/xorg-server/hw/xnest/XNPixmap.h
+++ b/xorg-server/hw/xnest/XNPixmap.h
@@ -1,37 +1,38 @@
-/*
-
-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 XNESTPIXMAP_H
-#define XNESTPIXMAP_H
-
-extern DevPrivateKeyRec xnestPixmapPrivateKeyRec;
-#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec)
-
-typedef struct {
- Pixmap pixmap;
-} xnestPrivPixmap;
-
-#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
- dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
-
-#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
-
-#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
-
-PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
- int depth, unsigned usage_hint);
-Bool xnestDestroyPixmap(PixmapPtr pPixmap);
-RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
-
-#endif /* XNESTPIXMAP_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 XNESTPIXMAP_H
+#define XNESTPIXMAP_H
+
+extern DevPrivateKeyRec xnestPixmapPrivateKeyRec;
+
+#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec)
+
+typedef struct {
+ Pixmap pixmap;
+} xnestPrivPixmap;
+
+#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
+
+#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
+
+#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
+
+PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
+ int depth, unsigned usage_hint);
+Bool xnestDestroyPixmap(PixmapPtr pPixmap);
+RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
+
+#endif /* XNESTPIXMAP_H */
diff --git a/xorg-server/hw/xnest/XNWindow.h b/xorg-server/hw/xnest/XNWindow.h
index c620767aa..02b0f3f36 100644
--- a/xorg-server/hw/xnest/XNWindow.h
+++ b/xorg-server/hw/xnest/XNWindow.h
@@ -1,73 +1,74 @@
-/*
-
-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 XNESTWINDOW_H
-#define XNESTWINDOW_H
-
-typedef struct {
- Window window;
- Window parent;
- int x;
- int y;
- unsigned int width;
- unsigned int height;
- unsigned int border_width;
- Window sibling_above;
- RegionPtr bounding_shape;
- RegionPtr clip_shape;
-} xnestPrivWin;
-
-typedef struct {
- WindowPtr pWin;
- Window window;
-} xnestWindowMatch;
-
-extern DevPrivateKeyRec xnestWindowPrivateKeyRec;
-#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec)
-
-#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
- dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))
-
-#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
-
-#define xnestWindowParent(pWin) \
- ((pWin)->parent ? \
- xnestWindow((pWin)->parent) : \
- xnestDefaultWindows[pWin->drawable.pScreen->myNum])
-
-#define xnestWindowSiblingAbove(pWin) \
- ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None)
-
-#define xnestWindowSiblingBelow(pWin) \
- ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None)
-
-#define CWParent CWSibling
-#define CWStackingOrder CWStackMode
-
-WindowPtr xnestWindowPtr(Window window);
-Bool xnestCreateWindow(WindowPtr pWin);
-Bool xnestDestroyWindow(WindowPtr pWin);
-Bool xnestPositionWindow(WindowPtr pWin, int x, int y);
-void xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
-Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
-Bool xnestRealizeWindow(WindowPtr pWin);
-Bool xnestUnrealizeWindow(WindowPtr pWin);
-void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
-void xnestClipNotify(WindowPtr pWin, int dx, int dy);
-void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
- RegionPtr other_exposed);
-void xnestSetShape(WindowPtr pWin, int kind);
-void xnestShapeWindow(WindowPtr pWin);
-
-#endif /* XNESTWINDOW_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 XNESTWINDOW_H
+#define XNESTWINDOW_H
+
+typedef struct {
+ Window window;
+ Window parent;
+ int x;
+ int y;
+ unsigned int width;
+ unsigned int height;
+ unsigned int border_width;
+ Window sibling_above;
+ RegionPtr bounding_shape;
+ RegionPtr clip_shape;
+} xnestPrivWin;
+
+typedef struct {
+ WindowPtr pWin;
+ Window window;
+} xnestWindowMatch;
+
+extern DevPrivateKeyRec xnestWindowPrivateKeyRec;
+
+#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec)
+
+#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
+ dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))
+
+#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
+
+#define xnestWindowParent(pWin) \
+ ((pWin)->parent ? \
+ xnestWindow((pWin)->parent) : \
+ xnestDefaultWindows[pWin->drawable.pScreen->myNum])
+
+#define xnestWindowSiblingAbove(pWin) \
+ ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None)
+
+#define xnestWindowSiblingBelow(pWin) \
+ ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None)
+
+#define CWParent CWSibling
+#define CWStackingOrder CWStackMode
+
+WindowPtr xnestWindowPtr(Window window);
+Bool xnestCreateWindow(WindowPtr pWin);
+Bool xnestDestroyWindow(WindowPtr pWin);
+Bool xnestPositionWindow(WindowPtr pWin, int x, int y);
+void xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
+Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
+Bool xnestRealizeWindow(WindowPtr pWin);
+Bool xnestUnrealizeWindow(WindowPtr pWin);
+void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
+void xnestClipNotify(WindowPtr pWin, int dx, int dy);
+void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
+ RegionPtr other_exposed);
+void xnestSetShape(WindowPtr pWin, int kind);
+void xnestShapeWindow(WindowPtr pWin);
+
+#endif /* XNESTWINDOW_H */
diff --git a/xorg-server/hw/xnest/Xnest.h b/xorg-server/hw/xnest/Xnest.h
index 827030c8f..adb9daf8b 100644
--- a/xorg-server/hw/xnest/Xnest.h
+++ b/xorg-server/hw/xnest/Xnest.h
@@ -40,6 +40,7 @@ typedef unsigned long Mask64;
typedef unsigned long Atom64;
typedef unsigned long VisualID64;
typedef unsigned long Time64;
+
#define XID XID64
#define Mask Mask64
#define Atom Atom64
@@ -53,6 +54,7 @@ typedef XID Cursor64;
typedef XID Colormap64;
typedef XID GContext64;
typedef XID KeySym64;
+
#define Window Window64
#define Drawable Drawable64
#define Font Font64
@@ -86,9 +88,3 @@ typedef XID KeySym64;
#undef GContext
#undef KeySym
#endif /*_XSERVER64_tmp*/
-
-
-
-
-
-
diff --git a/xorg-server/hw/xnest/xnest-config.h b/xorg-server/hw/xnest/xnest-config.h
index 4889f1fdd..ef48c580f 100644
--- a/xorg-server/hw/xnest/xnest-config.h
+++ b/xorg-server/hw/xnest/xnest-config.h
@@ -33,4 +33,4 @@
#undef MITSHM
-#endif /* XNEST_CONFIG_H */
+#endif /* XNEST_CONFIG_H */