aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/miext
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/miext')
-rw-r--r--xorg-server/miext/cw/cw.h342
-rw-r--r--xorg-server/miext/damage/damagestr.h72
-rw-r--r--xorg-server/miext/rootless/rootlessCommon.h574
-rw-r--r--xorg-server/miext/rootless/rootlessConfig.h124
-rw-r--r--xorg-server/miext/shadow/shalloc.c99
5 files changed, 604 insertions, 607 deletions
diff --git a/xorg-server/miext/cw/cw.h b/xorg-server/miext/cw/cw.h
index 10d088ad2..9f880f7f5 100644
--- a/xorg-server/miext/cw/cw.h
+++ b/xorg-server/miext/cw/cw.h
@@ -1,169 +1,173 @@
-/*
- * Copyright © 2004 Eric Anholt
- *
- * 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, and that the name of Eric Anholt not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Eric Anholt makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "gcstruct.h"
-#include "picturestr.h"
-#include "privates.h"
-
-/*
- * One of these structures is allocated per GC that gets used with a window with
- * backing pixmap.
- */
-
-typedef struct {
- GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
- * set FALSE and the clientClip set to
- * clip output to the valid regions of the
- * backing pixmap. */
- unsigned long serialNumber; /* clientClip computed time */
- unsigned long stateChanges; /* changes in parent gc since last copy */
- GCOps *wrapOps; /* wrapped ops */
- GCFuncs *wrapFuncs; /* wrapped funcs */
-} cwGCRec, *cwGCPtr;
-
-extern _X_EXPORT DevPrivateKeyRec cwGCKeyRec;
-#define cwGCKey (&cwGCKeyRec)
-
-#define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey))
-#define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p)
-
-/*
- * One of these structures is allocated per Picture that gets used with a
- * window with a backing pixmap
- */
-
-typedef struct {
- PicturePtr pBackingPicture;
- unsigned long serialNumber;
- unsigned long stateChanges;
-} cwPictureRec, *cwPicturePtr;
-
-extern _X_EXPORT DevPrivateKeyRec cwPictureKeyRec;
-#define cwPictureKey (&cwPictureKeyRec)
-
-#define getCwPicture(pPicture) (pPicture->pDrawable ? \
- (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0)
-#define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p)
-
-extern _X_EXPORT DevPrivateKeyRec cwWindowKeyRec;
-#define cwWindowKey (&cwWindowKeyRec)
-
-#define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey)
-#define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow))
-#define setCwPixmap(pWindow,pPixmap) \
- dixSetPrivate(&(pWindow)->devPrivates, cwWindowKey, pPixmap)
-
-#define cwDrawableIsRedirWindow(pDraw) \
- ((pDraw)->type == DRAWABLE_WINDOW && \
- getCwPixmap((WindowPtr) (pDraw)) != NULL)
-
-typedef struct {
- /*
- * screen func wrappers
- */
- CloseScreenProcPtr CloseScreen;
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
- CreateGCProcPtr CreateGC;
-
- CopyWindowProcPtr CopyWindow;
-
- GetWindowPixmapProcPtr GetWindowPixmap;
- SetWindowPixmapProcPtr SetWindowPixmap;
-
- DestroyPictureProcPtr DestroyPicture;
- ChangePictureClipProcPtr ChangePictureClip;
- DestroyPictureClipProcPtr DestroyPictureClip;
-
- ChangePictureProcPtr ChangePicture;
- ValidatePictureProcPtr ValidatePicture;
-
- CompositeProcPtr Composite;
- CompositeRectsProcPtr CompositeRects;
-
- TrapezoidsProcPtr Trapezoids;
- TrianglesProcPtr Triangles;
-
- RasterizeTrapezoidProcPtr RasterizeTrapezoid;
-} cwScreenRec, *cwScreenPtr;
-
-extern _X_EXPORT DevPrivateKeyRec cwScreenKeyRec;
-#define cwScreenKey (&cwScreenKeyRec)
-
-#define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey))
-#define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p)
-
-#define CW_OFFSET_XYPOINTS(ppt, npt) do { \
- DDXPointPtr _ppt = (DDXPointPtr)(ppt); \
- int _i; \
- for (_i = 0; _i < npt; _i++) { \
- _ppt[_i].x += dst_off_x; \
- _ppt[_i].y += dst_off_y; \
- } \
-} while (0)
-
-#define CW_OFFSET_RECTS(prect, nrect) do { \
- int _i; \
- for (_i = 0; _i < nrect; _i++) { \
- (prect)[_i].x += dst_off_x; \
- (prect)[_i].y += dst_off_y; \
- } \
-} while (0)
-
-#define CW_OFFSET_ARCS(parc, narc) do { \
- int _i; \
- for (_i = 0; _i < narc; _i++) { \
- (parc)[_i].x += dst_off_x; \
- (parc)[_i].y += dst_off_y; \
- } \
-} while (0)
-
-#define CW_OFFSET_XY_DST(x, y) do { \
- (x) = (x) + dst_off_x; \
- (y) = (y) + dst_off_y; \
-} while (0)
-
-#define CW_OFFSET_XY_SRC(x, y) do { \
- (x) = (x) + src_off_x; \
- (y) = (y) + src_off_y; \
-} while (0)
-
-/* cw.c */
-extern _X_EXPORT DrawablePtr
-cwGetBackingDrawable(DrawablePtr pDrawable, int *x_off, int *y_off);
-
-/* cw_render.c */
-
-extern _X_EXPORT void
-cwInitializeRender (ScreenPtr pScreen);
-
-extern _X_EXPORT void
-cwFiniRender (ScreenPtr pScreen);
-
-/* cw.c */
-
-extern _X_EXPORT void
-miInitializeCompositeWrapper(ScreenPtr pScreen);
+/*
+ * Copyright © 2004 Eric Anholt
+ *
+ * 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, and that the name of Eric Anholt not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Eric Anholt makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "gcstruct.h"
+#include "picturestr.h"
+#include "privates.h"
+
+/*
+ * One of these structures is allocated per GC that gets used with a window with
+ * backing pixmap.
+ */
+
+typedef struct {
+ GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
+ * set FALSE and the clientClip set to
+ * clip output to the valid regions of the
+ * backing pixmap. */
+ unsigned long serialNumber; /* clientClip computed time */
+ unsigned long stateChanges; /* changes in parent gc since last copy */
+ GCOps *wrapOps; /* wrapped ops */
+ GCFuncs *wrapFuncs; /* wrapped funcs */
+} cwGCRec, *cwGCPtr;
+
+extern _X_EXPORT DevPrivateKeyRec cwGCKeyRec;
+
+#define cwGCKey (&cwGCKeyRec)
+
+#define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey))
+#define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p)
+
+/*
+ * One of these structures is allocated per Picture that gets used with a
+ * window with a backing pixmap
+ */
+
+typedef struct {
+ PicturePtr pBackingPicture;
+ unsigned long serialNumber;
+ unsigned long stateChanges;
+} cwPictureRec, *cwPicturePtr;
+
+extern _X_EXPORT DevPrivateKeyRec cwPictureKeyRec;
+
+#define cwPictureKey (&cwPictureKeyRec)
+
+#define getCwPicture(pPicture) (pPicture->pDrawable ? \
+ (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0)
+#define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p)
+
+extern _X_EXPORT DevPrivateKeyRec cwWindowKeyRec;
+
+#define cwWindowKey (&cwWindowKeyRec)
+
+#define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey)
+#define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow))
+#define setCwPixmap(pWindow,pPixmap) \
+ dixSetPrivate(&(pWindow)->devPrivates, cwWindowKey, pPixmap)
+
+#define cwDrawableIsRedirWindow(pDraw) \
+ ((pDraw)->type == DRAWABLE_WINDOW && \
+ getCwPixmap((WindowPtr) (pDraw)) != NULL)
+
+typedef struct {
+ /*
+ * screen func wrappers
+ */
+ CloseScreenProcPtr CloseScreen;
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ CreateGCProcPtr CreateGC;
+
+ CopyWindowProcPtr CopyWindow;
+
+ GetWindowPixmapProcPtr GetWindowPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+
+ DestroyPictureProcPtr DestroyPicture;
+ ChangePictureClipProcPtr ChangePictureClip;
+ DestroyPictureClipProcPtr DestroyPictureClip;
+
+ ChangePictureProcPtr ChangePicture;
+ ValidatePictureProcPtr ValidatePicture;
+
+ CompositeProcPtr Composite;
+ CompositeRectsProcPtr CompositeRects;
+
+ TrapezoidsProcPtr Trapezoids;
+ TrianglesProcPtr Triangles;
+
+ RasterizeTrapezoidProcPtr RasterizeTrapezoid;
+} cwScreenRec, *cwScreenPtr;
+
+extern _X_EXPORT DevPrivateKeyRec cwScreenKeyRec;
+
+#define cwScreenKey (&cwScreenKeyRec)
+
+#define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey))
+#define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p)
+
+#define CW_OFFSET_XYPOINTS(ppt, npt) do { \
+ DDXPointPtr _ppt = (DDXPointPtr)(ppt); \
+ int _i; \
+ for (_i = 0; _i < npt; _i++) { \
+ _ppt[_i].x += dst_off_x; \
+ _ppt[_i].y += dst_off_y; \
+ } \
+} while (0)
+
+#define CW_OFFSET_RECTS(prect, nrect) do { \
+ int _i; \
+ for (_i = 0; _i < nrect; _i++) { \
+ (prect)[_i].x += dst_off_x; \
+ (prect)[_i].y += dst_off_y; \
+ } \
+} while (0)
+
+#define CW_OFFSET_ARCS(parc, narc) do { \
+ int _i; \
+ for (_i = 0; _i < narc; _i++) { \
+ (parc)[_i].x += dst_off_x; \
+ (parc)[_i].y += dst_off_y; \
+ } \
+} while (0)
+
+#define CW_OFFSET_XY_DST(x, y) do { \
+ (x) = (x) + dst_off_x; \
+ (y) = (y) + dst_off_y; \
+} while (0)
+
+#define CW_OFFSET_XY_SRC(x, y) do { \
+ (x) = (x) + src_off_x; \
+ (y) = (y) + src_off_y; \
+} while (0)
+
+/* cw.c */
+extern _X_EXPORT DrawablePtr
+ cwGetBackingDrawable(DrawablePtr pDrawable, int *x_off, int *y_off);
+
+/* cw_render.c */
+
+extern _X_EXPORT void
+ cwInitializeRender(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+ cwFiniRender(ScreenPtr pScreen);
+
+/* cw.c */
+
+extern _X_EXPORT void
+ miInitializeCompositeWrapper(ScreenPtr pScreen);
diff --git a/xorg-server/miext/damage/damagestr.h b/xorg-server/miext/damage/damagestr.h
index b224958d1..89189905e 100644
--- a/xorg-server/miext/damage/damagestr.h
+++ b/xorg-server/miext/damage/damagestr.h
@@ -30,56 +30,56 @@
#include "damage.h"
#include "gcstruct.h"
#include "privates.h"
-# include "picturestr.h"
+#include "picturestr.h"
typedef struct _damage {
- DamagePtr pNext;
- DamagePtr pNextWin;
- RegionRec damage;
-
- DamageReportLevel damageLevel;
- Bool isInternal;
- void *closure;
- Bool isWindow;
- DrawablePtr pDrawable;
-
- DamageReportFunc damageReport;
- DamageReportFunc damageReportPostRendering;
- DamageDestroyFunc damageDestroy;
- DamageMarkerFunc damageMarker;
-
- Bool reportAfter;
- RegionRec pendingDamage; /* will be flushed post submission at the latest */
- RegionRec backupDamage; /* for use with damageMarker */
- ScreenPtr pScreen;
- PrivateRec *devPrivates;
+ DamagePtr pNext;
+ DamagePtr pNextWin;
+ RegionRec damage;
+
+ DamageReportLevel damageLevel;
+ Bool isInternal;
+ void *closure;
+ Bool isWindow;
+ DrawablePtr pDrawable;
+
+ DamageReportFunc damageReport;
+ DamageReportFunc damageReportPostRendering;
+ DamageDestroyFunc damageDestroy;
+ DamageMarkerFunc damageMarker;
+
+ Bool reportAfter;
+ RegionRec pendingDamage; /* will be flushed post submission at the latest */
+ RegionRec backupDamage; /* for use with damageMarker */
+ ScreenPtr pScreen;
+ PrivateRec *devPrivates;
} DamageRec;
typedef struct _damageScrPriv {
- int internalLevel;
+ int internalLevel;
/*
* For DDXen which don't provide GetScreenPixmap, this provides
* a place to hook damage for windows on the screen
*/
- DamagePtr pScreenDamage;
-
- CopyWindowProcPtr CopyWindow;
- CloseScreenProcPtr CloseScreen;
- CreateGCProcPtr CreateGC;
- DestroyPixmapProcPtr DestroyPixmap;
- SetWindowPixmapProcPtr SetWindowPixmap;
- DestroyWindowProcPtr DestroyWindow;
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
- AddTrapsProcPtr AddTraps;
+ DamagePtr pScreenDamage;
+
+ CopyWindowProcPtr CopyWindow;
+ CloseScreenProcPtr CloseScreen;
+ CreateGCProcPtr CreateGC;
+ DestroyPixmapProcPtr DestroyPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+ DestroyWindowProcPtr DestroyWindow;
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+ AddTrapsProcPtr AddTraps;
/* Table of wrappable function pointers */
- DamageScreenFuncsRec funcs;
+ DamageScreenFuncsRec funcs;
} DamageScrPrivRec, *DamageScrPrivPtr;
typedef struct _damageGCPriv {
- GCOps *ops;
+ GCOps *ops;
GCFuncs *funcs;
} DamageGCPrivRec, *DamageGCPrivPtr;
@@ -111,4 +111,4 @@ typedef struct _damageGCPriv {
#define damageSetWinPriv(pWin,d) \
dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d)
-#endif /* _DAMAGESTR_H_ */
+#endif /* _DAMAGESTR_H_ */
diff --git a/xorg-server/miext/rootless/rootlessCommon.h b/xorg-server/miext/rootless/rootlessCommon.h
index 893ca9825..fd9c941f4 100644
--- a/xorg-server/miext/rootless/rootlessCommon.h
+++ b/xorg-server/miext/rootless/rootlessCommon.h
@@ -1,290 +1,284 @@
-/*
- * Common internal rootless definitions and code
- */
-/*
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
- * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdint.h>
-#ifndef _ROOTLESSCOMMON_H
-#define _ROOTLESSCOMMON_H
-
-#include "misc.h"
-#include "rootless.h"
-#include "fb.h"
-
-#include "scrnintstr.h"
-
-#include "picturestr.h"
-
-
-// Debug output, or not.
-#ifdef ROOTLESSDEBUG
-#define RL_DEBUG_MSG ErrorF
-#else
-#define RL_DEBUG_MSG(a, ...)
-#endif
-
-
-// Global variables
-extern DevPrivateKeyRec rootlessGCPrivateKeyRec;
-#define rootlessGCPrivateKey (&rootlessGCPrivateKeyRec)
-
-extern DevPrivateKeyRec rootlessScreenPrivateKeyRec;
-#define rootlessScreenPrivateKey (&rootlessScreenPrivateKeyRec)
-
-extern DevPrivateKeyRec rootlessWindowPrivateKeyRec;
-#define rootlessWindowPrivateKey (&rootlessWindowPrivateKeyRec)
-
-extern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec;
-#define rootlessWindowOldPixmapPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec)
-
-
-// RootlessGCRec: private per-gc data
-typedef struct {
- GCFuncs *originalFuncs;
- GCOps *originalOps;
-} RootlessGCRec;
-
-
-// RootlessScreenRec: per-screen private data
-typedef struct _RootlessScreenRec {
- // Rootless implementation functions
- RootlessFrameProcsPtr imp;
-
- // Wrapped screen functions
- CreateScreenResourcesProcPtr CreateScreenResources;
- CloseScreenProcPtr CloseScreen;
-
- CreateWindowProcPtr CreateWindow;
- DestroyWindowProcPtr DestroyWindow;
- RealizeWindowProcPtr RealizeWindow;
- UnrealizeWindowProcPtr UnrealizeWindow;
- MoveWindowProcPtr MoveWindow;
- ResizeWindowProcPtr ResizeWindow;
- RestackWindowProcPtr RestackWindow;
- ReparentWindowProcPtr ReparentWindow;
- ChangeBorderWidthProcPtr ChangeBorderWidth;
- PositionWindowProcPtr PositionWindow;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
-
- CreateGCProcPtr CreateGC;
- CopyWindowProcPtr CopyWindow;
- GetImageProcPtr GetImage;
- SourceValidateProcPtr SourceValidate;
-
- MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
- ValidateTreeProcPtr ValidateTree;
-
- SetShapeProcPtr SetShape;
-
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
-
- InstallColormapProcPtr InstallColormap;
- UninstallColormapProcPtr UninstallColormap;
- StoreColorsProcPtr StoreColors;
-
- void *pixmap_data;
- unsigned int pixmap_data_size;
-
- ColormapPtr colormap;
-
- void *redisplay_timer;
- unsigned int redisplay_timer_set :1;
- unsigned int redisplay_queued :1;
- unsigned int redisplay_expired :1;
- unsigned int colormap_changed :1;
-} RootlessScreenRec, *RootlessScreenPtr;
-
-// "Definition of the Porting Layer for the X11 Sample Server" says
-// unwrap and rewrap of screen functions is unnecessary, but
-// screen->CreateGC changes after a call to cfbCreateGC.
-
-#define SCREEN_UNWRAP(screen, fn) \
- screen->fn = SCREENREC(screen)->fn;
-
-#define SCREEN_WRAP(screen, fn) \
- SCREENREC(screen)->fn = screen->fn; \
- screen->fn = Rootless##fn
-
-
-// Accessors for screen and window privates
-
-#define SCREENREC(pScreen) ((RootlessScreenRec *) \
- dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey))
-
-#define SETSCREENREC(pScreen, v) \
- dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v)
-
-#define WINREC(pWin) ((RootlessWindowRec *) \
- dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey))
-
-#define SETWINREC(pWin, v) \
- dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v)
-
-// Call a rootless implementation function.
-// Many rootless implementation functions are allowed to be NULL.
-#define CallFrameProc(pScreen, proc, params) \
- if (SCREENREC(pScreen)->frameProcs.proc) { \
- RL_DEBUG_MSG("calling frame proc " #proc " "); \
- SCREENREC(pScreen)->frameProcs.proc params; \
- }
-
-
-// BoxRec manipulators
-// Copied from shadowfb
-
-#define TRIM_BOX(box, pGC) { \
- BoxPtr extents = &pGC->pCompositeClip->extents;\
- if(box.x1 < extents->x1) box.x1 = extents->x1; \
- if(box.x2 > extents->x2) box.x2 = extents->x2; \
- if(box.y1 < extents->y1) box.y1 = extents->y1; \
- if(box.y2 > extents->y2) box.y2 = extents->y2; \
-}
-
-#define TRANSLATE_BOX(box, pDraw) { \
- box.x1 += pDraw->x; \
- box.x2 += pDraw->x; \
- box.y1 += pDraw->y; \
- box.y2 += pDraw->y; \
-}
-
-#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \
- TRANSLATE_BOX(box, pDraw); \
- TRIM_BOX(box, pGC); \
-}
-
-#define BOX_NOT_EMPTY(box) \
- (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0))
-
-
-// HUGE_ROOT and NORMAL_ROOT
-// We don't want to clip windows to the edge of the screen.
-// HUGE_ROOT temporarily makes the root window really big.
-// This is needed as a wrapper around any function that calls
-// SetWinSize or SetBorderSize which clip a window against its
-// parents, including the root.
-
-extern RegionRec rootlessHugeRoot;
-
-#define HUGE_ROOT(pWin) \
- do { \
- WindowPtr w = pWin; \
- while (w->parent) \
- w = w->parent; \
- saveRoot = w->winSize; \
- w->winSize = rootlessHugeRoot; \
- } while (0)
-
-#define NORMAL_ROOT(pWin) \
- do { \
- WindowPtr w = pWin; \
- while (w->parent) \
- w = w->parent; \
- w->winSize = saveRoot; \
- } while (0)
-
-
-// Returns TRUE if this window is a top-level window (i.e. child of the root)
-// The root is not a top-level window.
-#define IsTopLevel(pWin) \
- ((pWin) && (pWin)->parent && !(pWin)->parent->parent)
-
-// Returns TRUE if this window is a root window
-#define IsRoot(pWin) \
- ((pWin) == (pWin)->drawable.pScreen->root)
-
-
-/*
- * SetPixmapBaseToScreen
- * Move the given pixmap's base address to where pixel (0, 0)
- * would be if the pixmap's actual data started at (x, y).
- * Can't access the bits before the first word of the drawable's data in
- * rootless mode, so make sure our base address is always 32-bit aligned.
- */
-#define SetPixmapBaseToScreen(pix, _x, _y) { \
- PixmapPtr _pPix = (PixmapPtr) (pix); \
- _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
- ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \
- (int)(_y) * _pPix->devKind); \
- if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \
- size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \
- (FB_UNIT / CHAR_BIT - 1); \
- _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
- _diff; \
- _pPix->drawable.x = _diff / \
- (_pPix->drawable.bitsPerPixel / CHAR_BIT); \
- } \
-}
-
-
-// Returns TRUE if this window is visible inside a frame
-// (e.g. it is visible and has a top-level or root parent)
-Bool IsFramedWindow(WindowPtr pWin);
-
-// Routines that cause regions to get redrawn.
-// DamageRegion and DamageRect are in global coordinates.
-// DamageBox is in window-local coordinates.
-void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion);
-void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h);
-void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox);
-void RootlessRedisplay(WindowPtr pWindow);
-void RootlessRedisplayScreen(ScreenPtr pScreen);
-
-void RootlessQueueRedisplay(ScreenPtr pScreen);
-
-/* Return the colormap currently installed on the given screen. */
-ColormapPtr RootlessGetColormap (ScreenPtr pScreen);
-
-/* Convert colormap to ARGB. */
-Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
- int n_colors, uint32_t *colors);
-
-void RootlessFlushWindowColormap (WindowPtr pWin);
-void RootlessFlushScreenColormaps (ScreenPtr pScreen);
-
-// Move a window to its proper location on the screen.
-void RootlessRepositionWindow(WindowPtr pWin);
-
-// Move the window to it's correct place in the physical stacking order.
-void RootlessReorderWindow(WindowPtr pWin);
-
-void RootlessScreenExpose (ScreenPtr pScreen);
-void RootlessHideAllWindows (void);
-void RootlessShowAllWindows (void);
-void RootlessUpdateRooted (Bool state);
-
-void RootlessEnableRoot (ScreenPtr pScreen);
-void RootlessDisableRoot (ScreenPtr pScreen);
-
-void RootlessSetPixmapOfAncestors(WindowPtr pWin);
-
-#endif /* _ROOTLESSCOMMON_H */
+/*
+ * Common internal rootless definitions and code
+ */
+/*
+ * Copyright (c) 2001 Greg Parker. All Rights Reserved.
+ * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdint.h>
+#ifndef _ROOTLESSCOMMON_H
+#define _ROOTLESSCOMMON_H
+
+#include "misc.h"
+#include "rootless.h"
+#include "fb.h"
+
+#include "scrnintstr.h"
+
+#include "picturestr.h"
+
+// Debug output, or not.
+#ifdef ROOTLESSDEBUG
+#define RL_DEBUG_MSG ErrorF
+#else
+#define RL_DEBUG_MSG(a, ...)
+#endif
+
+// Global variables
+extern DevPrivateKeyRec rootlessGCPrivateKeyRec;
+
+#define rootlessGCPrivateKey (&rootlessGCPrivateKeyRec)
+
+extern DevPrivateKeyRec rootlessScreenPrivateKeyRec;
+
+#define rootlessScreenPrivateKey (&rootlessScreenPrivateKeyRec)
+
+extern DevPrivateKeyRec rootlessWindowPrivateKeyRec;
+
+#define rootlessWindowPrivateKey (&rootlessWindowPrivateKeyRec)
+
+extern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec;
+
+#define rootlessWindowOldPixmapPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec)
+
+// RootlessGCRec: private per-gc data
+typedef struct {
+ GCFuncs *originalFuncs;
+ GCOps *originalOps;
+} RootlessGCRec;
+
+// RootlessScreenRec: per-screen private data
+typedef struct _RootlessScreenRec {
+ // Rootless implementation functions
+ RootlessFrameProcsPtr imp;
+
+ // Wrapped screen functions
+ CreateScreenResourcesProcPtr CreateScreenResources;
+ CloseScreenProcPtr CloseScreen;
+
+ CreateWindowProcPtr CreateWindow;
+ DestroyWindowProcPtr DestroyWindow;
+ RealizeWindowProcPtr RealizeWindow;
+ UnrealizeWindowProcPtr UnrealizeWindow;
+ MoveWindowProcPtr MoveWindow;
+ ResizeWindowProcPtr ResizeWindow;
+ RestackWindowProcPtr RestackWindow;
+ ReparentWindowProcPtr ReparentWindow;
+ ChangeBorderWidthProcPtr ChangeBorderWidth;
+ PositionWindowProcPtr PositionWindow;
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+
+ CreateGCProcPtr CreateGC;
+ CopyWindowProcPtr CopyWindow;
+ GetImageProcPtr GetImage;
+ SourceValidateProcPtr SourceValidate;
+
+ MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
+ ValidateTreeProcPtr ValidateTree;
+
+ SetShapeProcPtr SetShape;
+
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+
+ InstallColormapProcPtr InstallColormap;
+ UninstallColormapProcPtr UninstallColormap;
+ StoreColorsProcPtr StoreColors;
+
+ void *pixmap_data;
+ unsigned int pixmap_data_size;
+
+ ColormapPtr colormap;
+
+ void *redisplay_timer;
+ unsigned int redisplay_timer_set:1;
+ unsigned int redisplay_queued:1;
+ unsigned int redisplay_expired:1;
+ unsigned int colormap_changed:1;
+} RootlessScreenRec, *RootlessScreenPtr;
+
+// "Definition of the Porting Layer for the X11 Sample Server" says
+// unwrap and rewrap of screen functions is unnecessary, but
+// screen->CreateGC changes after a call to cfbCreateGC.
+
+#define SCREEN_UNWRAP(screen, fn) \
+ screen->fn = SCREENREC(screen)->fn;
+
+#define SCREEN_WRAP(screen, fn) \
+ SCREENREC(screen)->fn = screen->fn; \
+ screen->fn = Rootless##fn
+
+// Accessors for screen and window privates
+
+#define SCREENREC(pScreen) ((RootlessScreenRec *) \
+ dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey))
+
+#define SETSCREENREC(pScreen, v) \
+ dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v)
+
+#define WINREC(pWin) ((RootlessWindowRec *) \
+ dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey))
+
+#define SETWINREC(pWin, v) \
+ dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v)
+
+// Call a rootless implementation function.
+// Many rootless implementation functions are allowed to be NULL.
+#define CallFrameProc(pScreen, proc, params) \
+ if (SCREENREC(pScreen)->frameProcs.proc) { \
+ RL_DEBUG_MSG("calling frame proc " #proc " "); \
+ SCREENREC(pScreen)->frameProcs.proc params; \
+ }
+
+// BoxRec manipulators
+// Copied from shadowfb
+
+#define TRIM_BOX(box, pGC) { \
+ BoxPtr extents = &pGC->pCompositeClip->extents;\
+ if(box.x1 < extents->x1) box.x1 = extents->x1; \
+ if(box.x2 > extents->x2) box.x2 = extents->x2; \
+ if(box.y1 < extents->y1) box.y1 = extents->y1; \
+ if(box.y2 > extents->y2) box.y2 = extents->y2; \
+}
+
+#define TRANSLATE_BOX(box, pDraw) { \
+ box.x1 += pDraw->x; \
+ box.x2 += pDraw->x; \
+ box.y1 += pDraw->y; \
+ box.y2 += pDraw->y; \
+}
+
+#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \
+ TRANSLATE_BOX(box, pDraw); \
+ TRIM_BOX(box, pGC); \
+}
+
+#define BOX_NOT_EMPTY(box) \
+ (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0))
+
+// HUGE_ROOT and NORMAL_ROOT
+// We don't want to clip windows to the edge of the screen.
+// HUGE_ROOT temporarily makes the root window really big.
+// This is needed as a wrapper around any function that calls
+// SetWinSize or SetBorderSize which clip a window against its
+// parents, including the root.
+
+extern RegionRec rootlessHugeRoot;
+
+#define HUGE_ROOT(pWin) \
+ do { \
+ WindowPtr w = pWin; \
+ while (w->parent) \
+ w = w->parent; \
+ saveRoot = w->winSize; \
+ w->winSize = rootlessHugeRoot; \
+ } while (0)
+
+#define NORMAL_ROOT(pWin) \
+ do { \
+ WindowPtr w = pWin; \
+ while (w->parent) \
+ w = w->parent; \
+ w->winSize = saveRoot; \
+ } while (0)
+
+// Returns TRUE if this window is a top-level window (i.e. child of the root)
+// The root is not a top-level window.
+#define IsTopLevel(pWin) \
+ ((pWin) && (pWin)->parent && !(pWin)->parent->parent)
+
+// Returns TRUE if this window is a root window
+#define IsRoot(pWin) \
+ ((pWin) == (pWin)->drawable.pScreen->root)
+
+/*
+ * SetPixmapBaseToScreen
+ * Move the given pixmap's base address to where pixel (0, 0)
+ * would be if the pixmap's actual data started at (x, y).
+ * Can't access the bits before the first word of the drawable's data in
+ * rootless mode, so make sure our base address is always 32-bit aligned.
+ */
+#define SetPixmapBaseToScreen(pix, _x, _y) { \
+ PixmapPtr _pPix = (PixmapPtr) (pix); \
+ _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
+ ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \
+ (int)(_y) * _pPix->devKind); \
+ if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \
+ size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \
+ (FB_UNIT / CHAR_BIT - 1); \
+ _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
+ _diff; \
+ _pPix->drawable.x = _diff / \
+ (_pPix->drawable.bitsPerPixel / CHAR_BIT); \
+ } \
+}
+
+// Returns TRUE if this window is visible inside a frame
+// (e.g. it is visible and has a top-level or root parent)
+Bool IsFramedWindow(WindowPtr pWin);
+
+// Routines that cause regions to get redrawn.
+// DamageRegion and DamageRect are in global coordinates.
+// DamageBox is in window-local coordinates.
+void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion);
+void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h);
+void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox);
+void RootlessRedisplay(WindowPtr pWindow);
+void RootlessRedisplayScreen(ScreenPtr pScreen);
+
+void RootlessQueueRedisplay(ScreenPtr pScreen);
+
+/* Return the colormap currently installed on the given screen. */
+ColormapPtr RootlessGetColormap(ScreenPtr pScreen);
+
+/* Convert colormap to ARGB. */
+Bool RootlessResolveColormap(ScreenPtr pScreen, int first_color,
+ int n_colors, uint32_t * colors);
+
+void RootlessFlushWindowColormap(WindowPtr pWin);
+void RootlessFlushScreenColormaps(ScreenPtr pScreen);
+
+// Move a window to its proper location on the screen.
+void RootlessRepositionWindow(WindowPtr pWin);
+
+// Move the window to it's correct place in the physical stacking order.
+void RootlessReorderWindow(WindowPtr pWin);
+
+void RootlessScreenExpose(ScreenPtr pScreen);
+void RootlessHideAllWindows(void);
+void RootlessShowAllWindows(void);
+void RootlessUpdateRooted(Bool state);
+
+void RootlessEnableRoot(ScreenPtr pScreen);
+void RootlessDisableRoot(ScreenPtr pScreen);
+
+void RootlessSetPixmapOfAncestors(WindowPtr pWin);
+
+#endif /* _ROOTLESSCOMMON_H */
diff --git a/xorg-server/miext/rootless/rootlessConfig.h b/xorg-server/miext/rootless/rootlessConfig.h
index 1ad3afcf0..d39ae63d2 100644
--- a/xorg-server/miext/rootless/rootlessConfig.h
+++ b/xorg-server/miext/rootless/rootlessConfig.h
@@ -1,62 +1,62 @@
-/*
- * Platform specific rootless configuration
- */
-/*
- * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _ROOTLESSCONFIG_H
-#define _ROOTLESSCONFIG_H
-
-#ifdef __APPLE__
-
-# define ROOTLESS_PROTECT_ALPHA TRUE
-# define ROOTLESS_REDISPLAY_DELAY 10
-# define ROOTLESS_RESIZE_GRAVITY TRUE
-/*# define ROOTLESSDEBUG*/
-
-/* Bit mask for alpha channel with a particular number of bits per
- pixel. Note that we only care for 32bpp data. Mac OS X uses planar
- alpha for 16bpp. */
-# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
-#endif /* __APPLE__ */
-
-#if defined(__CYGWIN__) || defined(WIN32)
-
-# define ROOTLESS_PROTECT_ALPHA NO
-# define ROOTLESS_REDISPLAY_DELAY 10
-# undef ROOTLESS_RESIZE_GRAVITY
-/*# define ROOTLESSDEBUG*/
-
-# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
-#endif /* __CYGWIN__ */
-
-#endif /* _ROOTLESSCONFIG_H */
+/*
+ * Platform specific rootless configuration
+ */
+/*
+ * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _ROOTLESSCONFIG_H
+#define _ROOTLESSCONFIG_H
+
+#ifdef __APPLE__
+
+#define ROOTLESS_PROTECT_ALPHA TRUE
+#define ROOTLESS_REDISPLAY_DELAY 10
+#define ROOTLESS_RESIZE_GRAVITY TRUE
+/*# define ROOTLESSDEBUG*/
+
+/* Bit mask for alpha channel with a particular number of bits per
+ pixel. Note that we only care for 32bpp data. Mac OS X uses planar
+ alpha for 16bpp. */
+#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
+
+#endif /* __APPLE__ */
+
+#if defined(__CYGWIN__) || defined(WIN32)
+
+#define ROOTLESS_PROTECT_ALPHA NO
+#define ROOTLESS_REDISPLAY_DELAY 10
+#undef ROOTLESS_RESIZE_GRAVITY
+/*# define ROOTLESSDEBUG*/
+
+#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
+
+#endif /* __CYGWIN__ */
+
+#endif /* _ROOTLESSCONFIG_H */
diff --git a/xorg-server/miext/shadow/shalloc.c b/xorg-server/miext/shadow/shalloc.c
index ebeaaaee6..e555135b9 100644
--- a/xorg-server/miext/shadow/shalloc.c
+++ b/xorg-server/miext/shadow/shalloc.c
@@ -1,50 +1,49 @@
-/*
- * Copyright © 2000 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include <X11/fonts/font.h>
-#include "dixfontstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "mi.h"
-#include "regionstr.h"
-#include "globals.h"
-#include "gcstruct.h"
-#include "shadow.h"
-
-void *
-shadowAlloc (int width, int height, int bpp)
-{
- int stride;
- void *fb;
-
- /* Cant use PixmapBytePad -- the structure is probably not initialized yet */
- stride = BitmapBytePad (width * bpp);
- fb = malloc(stride * height);
- return fb;
-}
+/*
+ * Copyright © 2000 Keith Packard
+ *
+ * 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, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <X11/X.h>
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include <X11/fonts/font.h>
+#include "dixfontstr.h"
+#include <X11/fonts/fontstruct.h>
+#include "mi.h"
+#include "regionstr.h"
+#include "globals.h"
+#include "gcstruct.h"
+#include "shadow.h"
+
+void *
+shadowAlloc(int width, int height, int bpp)
+{
+ int stride;
+ void *fb;
+
+ /* Cant use PixmapBytePad -- the structure is probably not initialized yet */
+ stride = BitmapBytePad(width * bpp);
+ fb = malloc(stride * height);
+ return fb;
+}