diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-12-05 15:36:12 +0000 |
commit | a90ee792d96752ad1b71b9ada922fa6afe478c99 (patch) | |
tree | 6143b00f7646951d23dfe2a4fe2992ca40b77069 /xserver/miext | |
parent | bc97d4ecc0aa9e1b823565b07282f848700bd11a (diff) |
Upgrade to xorg-server 1.9.2.
Tested by ajacoutot@, krw@, shadchin@ and jasper@ on various configurations
including multihead with both zaphod and xrandr.
Diffstat (limited to 'xserver/miext')
27 files changed, 436 insertions, 437 deletions
diff --git a/xserver/miext/Makefile.in b/xserver/miext/Makefile.in index 68c3b744c..d4a455f2e 100644 --- a/xserver/miext/Makefile.in +++ b/xserver/miext/Makefile.in @@ -103,10 +103,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -194,6 +190,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -208,6 +206,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -225,10 +224,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -284,10 +287,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -305,17 +309,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -342,20 +340,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -447,6 +448,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/cw/Makefile.in b/xserver/miext/cw/Makefile.in index 8d46a1778..50e54e17d 100644 --- a/xserver/miext/cw/Makefile.in +++ b/xserver/miext/cw/Makefile.in @@ -107,10 +107,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -198,6 +194,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -212,6 +210,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -229,10 +228,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -288,10 +291,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -309,17 +313,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -346,20 +344,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -451,6 +452,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/cw/cw.c b/xserver/miext/cw/cw.c index 74000ffa0..58816c9a2 100644 --- a/xserver/miext/cw/cw.c +++ b/xserver/miext/cw/cw.c @@ -43,16 +43,11 @@ #define CW_ASSERT(x) do {} while (0) #endif -static int cwGCKeyIndex; -DevPrivateKey cwGCKey = &cwGCKeyIndex; -static int cwScreenKeyIndex; -DevPrivateKey cwScreenKey = &cwScreenKeyIndex; -static int cwWindowKeyIndex; -DevPrivateKey cwWindowKey = &cwWindowKeyIndex; -#ifdef RENDER -static int cwPictureKeyIndex; -DevPrivateKey cwPictureKey = &cwPictureKeyIndex; -#endif +DevPrivateKeyRec cwGCKeyRec; +DevPrivateKeyRec cwScreenKeyRec; +DevPrivateKeyRec cwWindowKeyRec; +DevPrivateKeyRec cwPictureKeyRec; + extern GCOps cwGCOps; static Bool @@ -131,7 +126,7 @@ cwCreateBackingGC(GCPtr pGC, DrawablePtr pDrawable) return FALSE; pPriv->serialNumber = 0; - pPriv->stateChanges = (1 << (GCLastBit + 1)) - 1; + pPriv->stateChanges = GCAllBits; return TRUE; } @@ -190,11 +185,11 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) if (pDrawable->serialNumber != pPriv->serialNumber || (pPriv->stateChanges & (GCClipXOrigin|GCClipYOrigin|GCClipMask))) { - XID vals[2]; + ChangeGCVal vals[2]; RegionPtr pCompositeClip; - pCompositeClip = REGION_CREATE (pScreen, NULL, 0); - REGION_COPY (pScreen, pCompositeClip, pGC->pCompositeClip); + pCompositeClip = RegionCreate(NULL, 0); + RegionCopy(pCompositeClip, pGC->pCompositeClip); /* Either the drawable has changed, or the clip list in the drawable has * changed. Copy the new clip list over and set the new translated @@ -204,10 +199,10 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) (*pBackingGC->funcs->ChangeClip) (pBackingGC, CT_REGION, (pointer) pCompositeClip, 0); - vals[0] = x_off - pDrawable->x; - vals[1] = y_off - pDrawable->y; - dixChangeGC(NullClient, pBackingGC, - (GCClipXOrigin | GCClipYOrigin), vals, NULL); + vals[0].val = x_off - pDrawable->x; + vals[1].val = y_off - pDrawable->y; + ChangeGC(NullClient, pBackingGC, + (GCClipXOrigin | GCClipYOrigin), vals); pPriv->serialNumber = pDrawable->serialNumber; /* @@ -225,11 +220,11 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) if ((pGC->patOrg.x + x_off) != pBackingGC->patOrg.x || (pGC->patOrg.y + y_off) != pBackingGC->patOrg.y) { - XID vals[2]; - vals[0] = pGC->patOrg.x + x_off; - vals[1] = pGC->patOrg.y + y_off; - dixChangeGC(NullClient, pBackingGC, - (GCTileStipXOrigin | GCTileStipYOrigin), vals, NULL); + ChangeGCVal vals[2]; + vals[0].val = pGC->patOrg.x + x_off; + vals[1].val = pGC->patOrg.y + y_off; + ChangeGC(NullClient, pBackingGC, + (GCTileStipXOrigin | GCTileStipYOrigin), vals); } ValidateGC(pBackingDrawable, pBackingGC); @@ -330,7 +325,7 @@ cwCreateGC(GCPtr pGC) ScreenPtr pScreen = pGC->pScreen; Bool ret; - bzero(pPriv, sizeof(cwGCRec)); + memset(pPriv, 0, sizeof(cwGCRec)); SCREEN_PROLOGUE(pScreen, CreateGC); if ( (ret = (*pScreen->CreateGC)(pGC)) ) @@ -405,7 +400,7 @@ cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - pExtents = REGION_EXTENTS(pScreen, prgnSrc); + pExtents = RegionExtents(prgnSrc); pBackingPixmap = (PixmapPtr) cwGetBackingDrawable((DrawablePtr)pWin, &x_off, &y_off); @@ -418,15 +413,15 @@ cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dst_y = src_y - dy; /* Translate region (as required by API) */ - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); pGC = GetScratchGC(pBackingPixmap->drawable.depth, pScreen); /* * Copy region to GC as clip, aligning as dest clip */ - pClip = REGION_CREATE (pScreen, NULL, 0); - REGION_INTERSECT(pScreen, pClip, &pWin->borderClip, prgnSrc); - REGION_TRANSLATE(pScreen, pClip, + pClip = RegionCreate(NULL, 0); + RegionIntersect(pClip, &pWin->borderClip, prgnSrc); + RegionTranslate(pClip, -pBackingPixmap->screen_x, -pBackingPixmap->screen_y); @@ -477,14 +472,21 @@ void miInitializeCompositeWrapper(ScreenPtr pScreen) { cwScreenPtr pScreenPriv; -#ifdef RENDER Bool has_render = GetPictureScreenIfSet(pScreen) != NULL; -#endif - if (!dixRequestPrivate(cwGCKey, sizeof(cwGCRec))) + if (!dixRegisterPrivateKey(&cwScreenKeyRec, PRIVATE_SCREEN, 0)) + return; + + if (!dixRegisterPrivateKey(&cwGCKeyRec, PRIVATE_GC, sizeof(cwGCRec))) + return; + + if (!dixRegisterPrivateKey(&cwWindowKeyRec, PRIVATE_WINDOW, 0)) + return; + + if (!dixRegisterPrivateKey(&cwPictureKeyRec, PRIVATE_PICTURE, 0)) return; - pScreenPriv = xalloc(sizeof(cwScreenRec)); + pScreenPriv = malloc(sizeof(cwScreenRec)); if (!pScreenPriv) return; @@ -499,19 +501,15 @@ miInitializeCompositeWrapper(ScreenPtr pScreen) SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap); SCREEN_EPILOGUE(pScreen, GetWindowPixmap, cwGetWindowPixmap); -#ifdef RENDER if (has_render) cwInitializeRender(pScreen); -#endif } static Bool cwCloseScreen (int i, ScreenPtr pScreen) { cwScreenPtr pScreenPriv; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif pScreenPriv = (cwScreenPtr)dixLookupPrivate(&pScreen->devPrivates, cwScreenKey); @@ -521,12 +519,10 @@ cwCloseScreen (int i, ScreenPtr pScreen) pScreen->CreateGC = pScreenPriv->CreateGC; pScreen->CopyWindow = pScreenPriv->CopyWindow; -#ifdef RENDER if (ps) cwFiniRender(pScreen); -#endif - xfree((pointer)pScreenPriv); + free((pointer)pScreenPriv); return (*pScreen->CloseScreen)(i, pScreen); } diff --git a/xserver/miext/cw/cw.h b/xserver/miext/cw/cw.h index ae65503f5..31eb9e57c 100644 --- a/xserver/miext/cw/cw.h +++ b/xserver/miext/cw/cw.h @@ -44,7 +44,8 @@ typedef struct { GCFuncs *wrapFuncs; /* wrapped funcs */ } cwGCRec, *cwGCPtr; -extern _X_EXPORT DevPrivateKey cwGCKey; +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) @@ -60,12 +61,15 @@ typedef struct { 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 DevPrivateKey cwPictureKey; -extern _X_EXPORT DevPrivateKey cwWindowKey; +extern _X_EXPORT DevPrivateKeyRec cwWindowKeyRec; +#define cwWindowKey (&cwWindowKeyRec) #define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey) #define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow)) @@ -90,7 +94,6 @@ typedef struct { GetWindowPixmapProcPtr GetWindowPixmap; SetWindowPixmapProcPtr SetWindowPixmap; -#ifdef RENDER DestroyPictureProcPtr DestroyPicture; ChangePictureClipProcPtr ChangePictureClip; DestroyPictureClipProcPtr DestroyPictureClip; @@ -107,10 +110,10 @@ typedef struct { TriFanProcPtr TriFan; RasterizeTrapezoidProcPtr RasterizeTrapezoid; -#endif } cwScreenRec, *cwScreenPtr; -extern _X_EXPORT DevPrivateKey cwScreenKey; +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) diff --git a/xserver/miext/cw/cw_render.c b/xserver/miext/cw/cw_render.c index 6e0c727c2..165c44f46 100644 --- a/xserver/miext/cw/cw_render.c +++ b/xserver/miext/cw/cw_render.c @@ -30,8 +30,6 @@ #include "windowstr.h" #include "cw.h" -#ifdef RENDER - #define cwPsDecl(pScreen) \ PictureScreenPtr ps = GetPictureScreen (pScreen); \ cwScreenPtr pCwScreen = getCwScreen (pScreen) @@ -75,7 +73,7 @@ cwCreatePicturePrivate (PicturePtr pPicture) int error; cwPicturePtr pPicturePrivate; - pPicturePrivate = xalloc (sizeof (cwPictureRec)); + pPicturePrivate = malloc(sizeof (cwPictureRec)); if (!pPicturePrivate) return NULL; @@ -85,7 +83,7 @@ cwCreatePicturePrivate (PicturePtr pPicture) &error); if (!pPicturePrivate->pBackingPicture) { - xfree (pPicturePrivate); + free(pPicturePrivate); return NULL; } @@ -109,7 +107,7 @@ cwDestroyPicturePrivate (PicturePtr pPicture) { if (pPicturePrivate->pBackingPicture) FreePicture (pPicturePrivate->pBackingPicture, 0); - xfree (pPicturePrivate); + free(pPicturePrivate); setCwPicture(pPicture, NULL); } } @@ -469,4 +467,3 @@ cwFiniRender (ScreenPtr pScreen) cwPsUnwrap(TriFan); } -#endif /* RENDER */ diff --git a/xserver/miext/damage/Makefile.in b/xserver/miext/damage/Makefile.in index ef135a334..c60aa34ca 100644 --- a/xserver/miext/damage/Makefile.in +++ b/xserver/miext/damage/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/damage/damage.c b/xserver/miext/damage/damage.c index 2851aed8d..1cf0513d0 100644 --- a/xserver/miext/damage/damage.c +++ b/xserver/miext/damage/damage.c @@ -70,21 +70,21 @@ #define pixmapDamage(pPixmap) damagePixPriv(pPixmap) -static int damageScrPrivateKeyIndex; -static DevPrivateKey damageScrPrivateKey = &damageScrPrivateKeyIndex; -static int damagePixPrivateKeyIndex; -static DevPrivateKey damagePixPrivateKey = &damagePixPrivateKeyIndex; -static int damageGCPrivateKeyIndex; -static DevPrivateKey damageGCPrivateKey = &damageGCPrivateKeyIndex; -static int damageWinPrivateKeyIndex; -static DevPrivateKey damageWinPrivateKey = &damageWinPrivateKeyIndex; +static DevPrivateKeyRec damageScrPrivateKeyRec; +#define damageScrPrivateKey (&damageScrPrivateKeyRec) +static DevPrivateKeyRec damagePixPrivateKeyRec; +#define damagePixPrivateKey (&damagePixPrivateKeyRec) +static DevPrivateKeyRec damageGCPrivateKeyRec; +#define damageGCPrivateKey (&damageGCPrivateKeyRec) +static DevPrivateKeyRec damageWinPrivateKeyRec; +#define damageWinPrivateKey (&damageWinPrivateKeyRec) static DamagePtr * getDrawableDamageRef (DrawablePtr pDrawable) { PixmapPtr pPixmap; - if (pDrawable->type == DRAWABLE_WINDOW) + if (WindowDrawable(pDrawable->type)) { ScreenPtr pScreen = pDrawable->pScreen; @@ -129,40 +129,40 @@ damageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion) switch (pDamage->damageLevel) { case DamageReportRawRegion: - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure); break; case DamageReportDeltaRegion: - REGION_NULL (pScreen, &tmpRegion); - REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, &pDamage->damage); - if (REGION_NOTEMPTY (pScreen, &tmpRegion)) { - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionNull(&tmpRegion); + RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage); + if (RegionNotEmpty(&tmpRegion)) { + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure); } - REGION_UNINIT(pScreen, &tmpRegion); + RegionUninit(&tmpRegion); break; case DamageReportBoundingBox: - tmpBox = *REGION_EXTENTS (pScreen, &pDamage->damage); - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + tmpBox = *RegionExtents(&pDamage->damage); + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); - if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &pDamage->damage))) { + if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage))) { (*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure); } break; case DamageReportNonEmpty: - was_empty = !REGION_NOTEMPTY(pScreen, &pDamage->damage); - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + was_empty = !RegionNotEmpty(&pDamage->damage); + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); - if (was_empty && REGION_NOTEMPTY(pScreen, &pDamage->damage)) { + if (was_empty && RegionNotEmpty(&pDamage->damage)) { (*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure); } break; case DamageReportNone: - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); break; } @@ -175,30 +175,30 @@ damageReportDamagePostRendering (DamagePtr pDamage, RegionPtr pOldDamage, Region RegionRec tmpRegion, newDamage; Bool was_empty; - REGION_UNION(pScreem, &newDamage, pOldDamage, pDamageRegion); + RegionUnion(&newDamage, pOldDamage, pDamageRegion); switch (pDamage->damageLevel) { case DamageReportRawRegion: (*pDamage->damageReportPostRendering) (pDamage, pDamageRegion, pDamage->closure); break; case DamageReportDeltaRegion: - REGION_NULL (pScreen, &tmpRegion); - REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, pOldDamage); - if (REGION_NOTEMPTY (pScreen, &tmpRegion)) { + RegionNull(&tmpRegion); + RegionSubtract(&tmpRegion, pDamageRegion, pOldDamage); + if (RegionNotEmpty(&tmpRegion)) { (*pDamage->damageReportPostRendering) (pDamage, &tmpRegion, pDamage->closure); } - REGION_UNINIT(pScreen, &tmpRegion); + RegionUninit(&tmpRegion); break; case DamageReportBoundingBox: - tmpBox = *REGION_EXTENTS (pScreen, pOldDamage); - if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &newDamage))) { + tmpBox = *RegionExtents(pOldDamage); + if (!BOX_SAME (&tmpBox, RegionExtents(&newDamage))) { (*pDamage->damageReportPostRendering) (pDamage, &newDamage, pDamage->closure); } break; case DamageReportNonEmpty: - was_empty = !REGION_NOTEMPTY(pScreen, pOldDamage); - if (was_empty && REGION_NOTEMPTY(pScreen, &newDamage)) { + was_empty = !RegionNotEmpty(pOldDamage); + if (was_empty && RegionNotEmpty(&newDamage)) { (*pDamage->damageReportPostRendering) (pDamage, &newDamage, pDamage->closure); } @@ -207,7 +207,7 @@ damageReportDamagePostRendering (DamagePtr pDamage, RegionPtr pOldDamage, Region break; } - REGION_UNINIT(pScreen, &newDamage); + RegionUninit(&newDamage); } #if DAMAGE_DEBUG_ENABLE @@ -233,7 +233,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, #endif /* short circuit for empty regions */ - if (!REGION_NOTEMPTY(pScreen, pRegion)) + if (!RegionNotEmpty(pRegion)) return; #ifdef COMPOSITE @@ -248,7 +248,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y; } if (screen_x || screen_y) - REGION_TRANSLATE (pScreen, pRegion, screen_x, screen_y); + RegionTranslate(pRegion, screen_x, screen_y); #endif if (pDrawable->type == DRAWABLE_WINDOW && @@ -256,22 +256,22 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, { if (subWindowMode == ClipByChildren) { - REGION_INTERSECT(pScreen, pRegion, pRegion, + RegionIntersect(pRegion, pRegion, &((WindowPtr)(pDrawable))->clipList); } else if (subWindowMode == IncludeInferiors) { RegionPtr pTempRegion = NotClippedByChildren((WindowPtr)(pDrawable)); - REGION_INTERSECT(pScreen, pRegion, pRegion, pTempRegion); - REGION_DESTROY(pScreen, pTempRegion); + RegionIntersect(pRegion, pRegion, pTempRegion); + RegionDestroy(pTempRegion); } /* If subWindowMode is set to an invalid value, don't perform * any drawable-based clipping. */ } - REGION_NULL (pScreen, &clippedRec); + RegionNull(&clippedRec); for (; pDamage; pDamage = pNext) { pNext = pDamage->pNext; @@ -300,7 +300,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, * Need to move everyone to screen coordinates * XXX what about off-screen pixmaps with non-zero x/y? */ - if (pDamage->pDrawable->type != DRAWABLE_WINDOW) + if (!WindowDrawable(pDamage->pDrawable->type)) { draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x; draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y; @@ -316,7 +316,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, { pDamageRegion = &clippedRec; if (pDamage->pDrawable->type == DRAWABLE_WINDOW) { - REGION_INTERSECT (pScreen, pDamageRegion, pRegion, + RegionIntersect(pDamageRegion, pRegion, &((WindowPtr)(pDamage->pDrawable))->borderClip); } else { BoxRec box; @@ -324,14 +324,14 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, box.y1 = draw_y; box.x2 = draw_x + pDamage->pDrawable->width; box.y2 = draw_y + pDamage->pDrawable->height; - REGION_INIT(pScreen, &pixClip, &box, 1); - REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip); - REGION_UNINIT(pScreen, &pixClip); + RegionInit(&pixClip, &box, 1); + RegionIntersect(pDamageRegion, pRegion, &pixClip); + RegionUninit(&pixClip); } /* * Short circuit empty results */ - if (!REGION_NOTEMPTY(pScreen, pDamageRegion)) + if (!RegionNotEmpty(pDamageRegion)) continue; } @@ -346,23 +346,23 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, * Move region to target coordinate space */ if (draw_x || draw_y) - REGION_TRANSLATE (pScreen, pDamageRegion, -draw_x, -draw_y); + RegionTranslate(pDamageRegion, -draw_x, -draw_y); /* Store damage region if needed after submission. */ if (pDamage->reportAfter || pDamage->damageMarker) - REGION_UNION(pScreen, &pDamage->pendingDamage, + RegionUnion(&pDamage->pendingDamage, &pDamage->pendingDamage, pDamageRegion); /* Duplicate current damage if needed. */ if (pDamage->damageMarker) - REGION_COPY(pScreen, &pDamage->backupDamage, &pDamage->damage); + RegionCopy(&pDamage->backupDamage, &pDamage->damage); /* Report damage now, if desired. */ if (!pDamage->reportAfter) { if (pDamage->damageReport) damageReportDamage (pDamage, pDamageRegion); else - REGION_UNION(pScreen, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); } @@ -370,14 +370,14 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, * translate original region back */ if (pDamageRegion == pRegion && (draw_x || draw_y)) - REGION_TRANSLATE (pScreen, pDamageRegion, draw_x, draw_y); + RegionTranslate(pDamageRegion, draw_x, draw_y); } #ifdef COMPOSITE if (screen_x || screen_y) - REGION_TRANSLATE (pScreen, pRegion, -screen_x, -screen_y); + RegionTranslate(pRegion, -screen_x, -screen_y); #endif - REGION_UNINIT (pScreen, &clippedRec); + RegionUninit(&clippedRec); } static void @@ -395,14 +395,14 @@ damageRegionProcessPending (DrawablePtr pDrawable) if (pDamage->damageReport) damageReportDamage (pDamage, &pDamage->pendingDamage); else - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, &pDamage->pendingDamage); } if (pDamage->reportAfter || pDamage->damageMarker) - REGION_EMPTY (pScreen, &pDamage->pendingDamage); + RegionEmpty(&pDamage->pendingDamage); if (pDamage->damageMarker) - REGION_EMPTY (pScreen, &pDamage->backupDamage); + RegionEmpty(&pDamage->backupDamage); } } @@ -418,13 +418,13 @@ damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode) { RegionRec region; - REGION_INIT (pDrawable->pScreen, ®ion, pBox, 1); + RegionInit(®ion, pBox, 1); #if DAMAGE_DEBUG_ENABLE _damageRegionAppend (pDrawable, ®ion, TRUE, subWindowMode, where); #else damageRegionAppend (pDrawable, ®ion, TRUE, subWindowMode); #endif - REGION_UNINIT (pDrawable->pScreen, ®ion); + RegionUninit(®ion); } static void damageValidateGC(GCPtr, unsigned long, DrawablePtr); @@ -593,10 +593,7 @@ damageDestroyClip(GCPtr pGC) #define checkGCDamage(d,g) (getDrawableDamage(d) && \ (!g->pCompositeClip ||\ - REGION_NOTEMPTY(d->pScreen, \ - g->pCompositeClip))) - -#ifdef RENDER + RegionNotEmpty(g->pCompositeClip))) #define TRIM_PICTURE_BOX(box, pDst) { \ BoxPtr extents = &pDst->pCompositeClip->extents;\ @@ -607,7 +604,7 @@ damageDestroyClip(GCPtr pGC) } #define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \ - REGION_NOTEMPTY(pScreen, p->pCompositeClip)) + RegionNotEmpty(p->pCompositeClip)) static void damageComposite (CARD8 op, @@ -774,7 +771,6 @@ damageAddTraps (PicturePtr pPicture, damageRegionProcessPending (pPicture->pDrawable); wrap (pScrPriv, ps, AddTraps, damageAddTraps); } -#endif /**********************************************************/ @@ -1514,7 +1510,7 @@ damageText (DrawablePtr pDrawable, imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16); - charinfo = xalloc(count * sizeof(CharInfoPtr)); + charinfo = malloc(count * sizeof(CharInfoPtr)); if (!charinfo) return x; @@ -1536,7 +1532,7 @@ damageText (DrawablePtr pDrawable, (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); } - xfree(charinfo); + free(charinfo); return x + w; } @@ -1766,9 +1762,9 @@ damageCopyWindow(WindowPtr pWindow, * The region comes in source relative, but the damage occurs * at the destination location. Translate back and forth. */ - REGION_TRANSLATE (pScreen, prgnSrc, dx, dy); + RegionTranslate(prgnSrc, dx, dy); damageRegionAppend (&pWindow->drawable, prgnSrc, FALSE, -1); - REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); } unwrap (pScrPriv, pScreen, CopyWindow); (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc); @@ -1851,7 +1847,7 @@ damageCloseScreen (int i, ScreenPtr pScreen) unwrap (pScrPriv, pScreen, CreateGC); unwrap (pScrPriv, pScreen, CopyWindow); unwrap (pScrPriv, pScreen, CloseScreen); - xfree (pScrPriv); + free(pScrPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -1882,20 +1878,27 @@ Bool DamageSetup (ScreenPtr pScreen) { DamageScrPrivPtr pScrPriv; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif const DamageScreenFuncsRec miFuncs = { miDamageCreate, miDamageRegister, miDamageUnregister, miDamageDestroy }; + if (!dixRegisterPrivateKey(&damageScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (dixLookupPrivate(&pScreen->devPrivates, damageScrPrivateKey)) return TRUE; - if (!dixRequestPrivate(damageGCPrivateKey, sizeof(DamageGCPrivRec))) + if (!dixRegisterPrivateKey(&damageGCPrivateKeyRec, PRIVATE_GC, sizeof(DamageGCPrivRec))) return FALSE; - pScrPriv = xalloc (sizeof (DamageScrPrivRec)); + if (!dixRegisterPrivateKey(&damagePixPrivateKeyRec, PRIVATE_PIXMAP, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&damageWinPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + + pScrPriv = malloc(sizeof (DamageScrPrivRec)); if (!pScrPriv) return FALSE; @@ -1908,13 +1911,11 @@ DamageSetup (ScreenPtr pScreen) wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap); wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow); wrap (pScrPriv, pScreen, CloseScreen, damageCloseScreen); -#ifdef RENDER if (ps) { wrap (pScrPriv, ps, Glyphs, damageGlyphs); wrap (pScrPriv, ps, Composite, damageComposite); wrap (pScrPriv, ps, AddTraps, damageAddTraps); } -#endif pScrPriv->funcs = miFuncs; @@ -1933,13 +1934,13 @@ DamageCreate (DamageReportFunc damageReport, damageScrPriv(pScreen); DamagePtr pDamage; - pDamage = xalloc (sizeof (DamageRec)); + pDamage = dixAllocateObjectWithPrivates(DamageRec, PRIVATE_DAMAGE); if (!pDamage) return 0; pDamage->pNext = 0; pDamage->pNextWin = 0; - REGION_NULL(pScreen, &pDamage->damage); - REGION_NULL(pScreen, &pDamage->pendingDamage); + RegionNull(&pDamage->damage); + RegionNull(&pDamage->pendingDamage); pDamage->damageLevel = damageLevel; pDamage->isInternal = isInternal; @@ -1953,7 +1954,6 @@ DamageCreate (DamageReportFunc damageReport, pDamage->damageDestroy = damageDestroy; pDamage->damageMarker = NULL; pDamage->pScreen = pScreen; - pDamage->devPrivates = NULL; (*pScrPriv->funcs.Create) (pDamage); @@ -2057,11 +2057,9 @@ DamageDestroy (DamagePtr pDamage) if (pDamage->damageDestroy) (*pDamage->damageDestroy) (pDamage, pDamage->closure); (*pScrPriv->funcs.Destroy) (pDamage); - dixFreePrivates(pDamage->devPrivates); - pDamage->devPrivates = NULL; - REGION_UNINIT (pScreen, &pDamage->damage); - REGION_UNINIT (pScreen, &pDamage->pendingDamage); - xfree (pDamage); + RegionUninit(&pDamage->damage); + RegionUninit(&pDamage->pendingDamage); + dixFreeObjectWithPrivates(pDamage, PRIVATE_DAMAGE); } Bool @@ -2072,7 +2070,7 @@ DamageSubtract (DamagePtr pDamage, RegionRec pixmapClip; DrawablePtr pDrawable = pDamage->pDrawable; - REGION_SUBTRACT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pRegion); + RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion); if (pDrawable) { if (pDrawable->type == DRAWABLE_WINDOW) @@ -2085,22 +2083,22 @@ DamageSubtract (DamagePtr pDamage, box.y1 = pDrawable->y; box.x2 = pDrawable->x + pDrawable->width; box.y2 = pDrawable->y + pDrawable->height; - REGION_INIT (pDrawable->pScreen, &pixmapClip, &box, 1); + RegionInit(&pixmapClip, &box, 1); pClip = &pixmapClip; } - REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, pDrawable->x, pDrawable->y); - REGION_INTERSECT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pClip); - REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y); + RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y); + RegionIntersect(&pDamage->damage, &pDamage->damage, pClip); + RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y); if (pDrawable->type != DRAWABLE_WINDOW) - REGION_UNINIT(pDrawable->pScreen, &pixmapClip); + RegionUninit(&pixmapClip); } - return REGION_NOTEMPTY (pDrawable->pScreen, &pDamage->damage); + return RegionNotEmpty(&pDamage->damage); } void DamageEmpty (DamagePtr pDamage) { - REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage); + RegionEmpty(&pDamage->damage); } RegionPtr diff --git a/xserver/miext/damage/damagestr.h b/xserver/miext/damage/damagestr.h index d7435b2a1..b224958d1 100644 --- a/xserver/miext/damage/damagestr.h +++ b/xserver/miext/damage/damagestr.h @@ -30,9 +30,7 @@ #include "damage.h" #include "gcstruct.h" #include "privates.h" -#ifdef RENDER # include "picturestr.h" -#endif typedef struct _damage { DamagePtr pNext; @@ -72,11 +70,9 @@ typedef struct _damageScrPriv { DestroyPixmapProcPtr DestroyPixmap; SetWindowPixmapProcPtr SetWindowPixmap; DestroyWindowProcPtr DestroyWindow; -#ifdef RENDER CompositeProcPtr Composite; GlyphsProcPtr Glyphs; AddTrapsProcPtr AddTraps; -#endif /* Table of wrappable function pointers */ DamageScreenFuncsRec funcs; diff --git a/xserver/miext/rootless/Makefile.in b/xserver/miext/rootless/Makefile.in index edc614034..b3da9831b 100644 --- a/xserver/miext/rootless/Makefile.in +++ b/xserver/miext/rootless/Makefile.in @@ -108,10 +108,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -199,6 +195,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -213,6 +211,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -230,10 +229,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -289,10 +292,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -310,17 +314,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -347,20 +345,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -452,6 +453,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/rootless/rootless.h b/xserver/miext/rootless/rootless.h index 00eac4e8a..dc4213f1e 100644 --- a/xserver/miext/rootless/rootless.h +++ b/xserver/miext/rootless/rootless.h @@ -444,7 +444,7 @@ void RootlessUpdateScreenPixmap(ScreenPtr pScreen); void RootlessRepositionWindows(ScreenPtr pScreen); /* - * Bring all windows to the front of the Aqua stack + * Bring all windows to the front of the native stack */ -void RootlessOrderAllWindows (void); +void RootlessOrderAllWindows (Bool include_unhitable); #endif /* _ROOTLESS_H */ diff --git a/xserver/miext/rootless/rootlessCommon.c b/xserver/miext/rootless/rootlessCommon.c index 39a3eed0f..f91cfb432 100644 --- a/xserver/miext/rootless/rootlessCommon.c +++ b/xserver/miext/rootless/rootlessCommon.c @@ -92,6 +92,9 @@ IsFramedWindow(WindowPtr pWin) { WindowPtr top; + if (!dixPrivateKeyRegistered(&rootlessWindowPrivateKeyRec)) + return FALSE; + if (!pWin->realized) return FALSE; top = TopLevelParent(pWin); @@ -262,7 +265,6 @@ void RootlessStopDrawing(WindowPtr pWindow, Bool flush) void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) { - ScreenPtr pScreen = pWindow->drawable.pScreen; RootlessWindowRec *winRec; RegionRec clipped; WindowPtr pTop; @@ -286,30 +288,31 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) drawing inside the clip, go to some lengths to avoid the general case intersection. */ - b1 = REGION_EXTENTS(pScreen, &pWindow->borderClip); - b2 = REGION_EXTENTS(pScreen, pRegion); + b1 = RegionExtents(&pWindow->borderClip); + b2 = RegionExtents(pRegion); if (EXTENTCHECK(b1, b2)) { /* Regions may overlap. */ - if (REGION_NUM_RECTS(pRegion) == 1) { + if (RegionNumRects(pRegion) == 1) { int in; /* Damaged region only has a single rect, so we can just compare that against the region */ - in = RECT_IN_REGION(pScreen, &pWindow->borderClip, - REGION_RECTS (pRegion)); + in = RegionContainsRect(&pWindow->borderClip, + RegionRects (pRegion)); if (in == rgnIN) { /* clip totally contains pRegion */ #ifdef ROOTLESS_TRACK_DAMAGE - REGION_UNION(pScreen, &winRec->damage, + RegionUnion(&winRec->damage, &winRec->damage, (pRegion)); #else - SCREENREC(pScreen)->imp->DamageRects(winRec->wid, - REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), + SCREENREC(pWindow->drawable.pScreen)->imp-> + DamageRects(winRec->wid, + RegionNumRects(pRegion), + RegionRects(pRegion), -winRec->x, -winRec->y); #endif @@ -325,20 +328,21 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) /* clip overlaps pRegion, need to intersect */ - REGION_NULL(pScreen, &clipped); - REGION_INTERSECT(pScreen, &clipped, &pWindow->borderClip, pRegion); + RegionNull(&clipped); + RegionIntersect(&clipped, &pWindow->borderClip, pRegion); #ifdef ROOTLESS_TRACK_DAMAGE - REGION_UNION(pScreen, &winRec->damage, + RegionUnion(&winRec->damage, &winRec->damage, (pRegion)); #else - SCREENREC(pScreen)->imp->DamageRects(winRec->wid, - REGION_NUM_RECTS(&clipped), - REGION_RECTS(&clipped), + SCREENREC(pWindow->drawable.pScreen)->imp-> + DamageRects(winRec->wid, + RegionNumRects(&clipped), + RegionRects(&clipped), -winRec->x, -winRec->y); #endif - REGION_UNINIT(pScreen, &clipped); + RegionUninit(&clipped); RootlessQueueRedisplay(pTop->drawable.pScreen); } @@ -346,8 +350,8 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) out: #ifdef ROOTLESSDEBUG { - BoxRec *box = REGION_RECTS(pRegion), *end; - int numBox = REGION_NUM_RECTS(pRegion); + BoxRec *box = RegionRects(pRegion), *end; + int numBox = RegionNumRects(pRegion); for (end = box+numBox; box < end; box++) { RL_DEBUG_MSG("Damage rect: %i, %i, %i, %i\n", @@ -369,11 +373,11 @@ RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) { RegionRec region; - REGION_INIT(pWindow->drawable.pScreen, ®ion, pBox, 1); + RegionInit(®ion, pBox, 1); RootlessDamageRegion(pWindow, ®ion); - REGION_UNINIT(pWindow->drawable.pScreen, ®ion); /* no-op */ + RegionUninit(®ion); /* no-op */ } @@ -396,11 +400,11 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) box.y1 = y; box.y2 = y + h; - REGION_INIT(pWindow->drawable.pScreen, ®ion, &box, 1); + RegionInit(®ion, &box, 1); RootlessDamageRegion(pWindow, ®ion); - REGION_UNINIT(pWindow->drawable.pScreen, ®ion); /* no-op */ + RegionUninit(®ion); /* no-op */ } @@ -418,18 +422,18 @@ RootlessRedisplay(WindowPtr pWindow) RootlessStopDrawing(pWindow, FALSE); - if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { + if (RegionNotEmpty(&winRec->damage)) { RL_DEBUG_MSG("Redisplay Win 0x%x, %i x %i @ (%i, %i)\n", pWindow, winRec->width, winRec->height, winRec->x, winRec->y); // move region to window local coords - REGION_TRANSLATE(pScreen, &winRec->damage, + RegionTranslate(&winRec->damage, -winRec->x, -winRec->y); SCREENREC(pScreen)->imp->UpdateRegion(winRec->wid, &winRec->damage); - REGION_EMPTY(pScreen, &winRec->damage); + RegionEmpty(&winRec->damage); } #else /* !ROOTLESS_TRACK_DAMAGE */ @@ -447,7 +451,7 @@ RootlessRedisplay(WindowPtr pWindow) void RootlessRepositionWindows(ScreenPtr pScreen) { - WindowPtr root = WindowTable[pScreen->myNum]; + WindowPtr root = pScreen->root; WindowPtr win; if (root != NULL) { @@ -468,7 +472,7 @@ RootlessRepositionWindows(ScreenPtr pScreen) void RootlessRedisplayScreen(ScreenPtr pScreen) { - WindowPtr root = WindowTable[pScreen->myNum]; + WindowPtr root = pScreen->root; if (root != NULL) { WindowPtr win; diff --git a/xserver/miext/rootless/rootlessCommon.h b/xserver/miext/rootless/rootlessCommon.h index d4a94f8ca..6faf1febd 100644 --- a/xserver/miext/rootless/rootlessCommon.h +++ b/xserver/miext/rootless/rootlessCommon.h @@ -42,9 +42,7 @@ #include "scrnintstr.h" -#ifdef RENDER #include "picturestr.h" -#endif // Debug output, or not. @@ -56,10 +54,17 @@ // Global variables -extern DevPrivateKey rootlessGCPrivateKey; -extern DevPrivateKey rootlessScreenPrivateKey; -extern DevPrivateKey rootlessWindowPrivateKey; -extern DevPrivateKey rootlessWindowOldPixmapPrivateKey; +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 @@ -100,10 +105,8 @@ typedef struct _RootlessScreenRec { SetShapeProcPtr SetShape; -#ifdef RENDER CompositeProcPtr Composite; GlyphsProcPtr Glyphs; -#endif InstallColormapProcPtr InstallColormap; UninstallColormapProcPtr UninstallColormap; @@ -217,7 +220,7 @@ extern RegionRec rootlessHugeRoot; // Returns TRUE if this window is a root window #define IsRoot(pWin) \ - ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum]) + ((pWin) == (pWin)->drawable.pScreen->root) /* diff --git a/xserver/miext/rootless/rootlessGC.c b/xserver/miext/rootless/rootlessGC.c index 0bd314d46..6af8d857f 100644 --- a/xserver/miext/rootless/rootlessGC.c +++ b/xserver/miext/rootless/rootlessGC.c @@ -1276,7 +1276,7 @@ static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, GCOP_WRAP(pGC); RL_DEBUG_MSG("polytext8 end\n"); - return (width + x); + return width + x; } static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, diff --git a/xserver/miext/rootless/rootlessScreen.c b/xserver/miext/rootless/rootlessScreen.c index 7a799d98c..43b9cbb53 100644 --- a/xserver/miext/rootless/rootlessScreen.c +++ b/xserver/miext/rootless/rootlessScreen.c @@ -62,15 +62,10 @@ extern int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, extern Bool RootlessCreateGC(GCPtr pGC); // Initialize globals -static int rootlessGCPrivateKeyIndex; -DevPrivateKey rootlessGCPrivateKey = &rootlessGCPrivateKeyIndex; -static int rootlessScreenPrivateKeyIndex; -DevPrivateKey rootlessScreenPrivateKey = &rootlessScreenPrivateKeyIndex; -static int rootlessWindowPrivateKeyIndex; -DevPrivateKey rootlessWindowPrivateKey = &rootlessWindowPrivateKeyIndex; -static int rootlessWindowOldPixmapPrivateKeyIndex; -DevPrivateKey rootlessWindowOldPixmapPrivateKey = &rootlessWindowOldPixmapPrivateKeyIndex; - +DevPrivateKeyRec rootlessGCPrivateKeyRec; +DevPrivateKeyRec rootlessScreenPrivateKeyRec; +DevPrivateKeyRec rootlessWindowPrivateKeyRec; +DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec; /* * RootlessUpdateScreenPixmap @@ -98,10 +93,10 @@ RootlessUpdateScreenPixmap(ScreenPtr pScreen) if (s->pixmap_data_size < rowbytes) { if (s->pixmap_data != NULL) - xfree(s->pixmap_data); + free(s->pixmap_data); s->pixmap_data_size = rowbytes; - s->pixmap_data = xalloc(s->pixmap_data_size); + s->pixmap_data = malloc(s->pixmap_data_size); if (s->pixmap_data == NULL) return; @@ -157,12 +152,12 @@ RootlessCloseScreen(int i, ScreenPtr pScreen) pScreen->CloseScreen = s->CloseScreen; if (s->pixmap_data != NULL) { - xfree (s->pixmap_data); + free(s->pixmap_data); s->pixmap_data = NULL; s->pixmap_data_size = 0; } - xfree(s); + free(s); return pScreen->CloseScreen(i, pScreen); } @@ -242,8 +237,6 @@ RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h) SCREEN_WRAP(pDrawable->pScreen, SourceValidate); } -#ifdef RENDER - static void RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, @@ -363,8 +356,6 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, } } -#endif // RENDER - /* * RootlessValidateTree @@ -445,9 +436,9 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, pChild = pWin; while (1) { if (pChild->viewable) { - if (REGION_BROKEN (pScreen, &pChild->winSize)) + if (RegionBroken(&pChild->winSize)) SetWinSize (pChild); - if (REGION_BROKEN (pScreen, &pChild->borderSize)) + if (RegionBroken(&pChild->borderSize)) SetBorderSize (pChild); (* MarkWindow)(pChild); if (pChild->firstChild) { @@ -497,7 +488,7 @@ static void expose_1 (WindowPtr pWin) { void RootlessScreenExpose (ScreenPtr pScreen) { - expose_1 (WindowTable[pScreen->myNum]); + expose_1 (pScreen->root); } @@ -641,11 +632,16 @@ RootlessAllocatePrivates(ScreenPtr pScreen) { RootlessScreenRec *s; - // no allocation needed for screen privates - if (!dixRequestPrivate(rootlessGCPrivateKey, sizeof(RootlessGCRec))) + if (!dixRegisterPrivateKey(&rootlessGCPrivateKeyRec, PRIVATE_GC, sizeof(RootlessGCRec))) + return FALSE; + if (!dixRegisterPrivateKey(&rootlessScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&rootlessWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&rootlessWindowOldPixmapPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; - s = xalloc(sizeof(RootlessScreenRec)); + s = malloc(sizeof(RootlessScreenRec)); if (! s) return FALSE; SETSCREENREC(pScreen, s); @@ -698,7 +694,6 @@ RootlessWrap(ScreenPtr pScreen) WRAP(SetShape); -#ifdef RENDER { // Composite and Glyphs don't use normal screen wrapping PictureScreenPtr ps = GetPictureScreen(pScreen); @@ -707,7 +702,6 @@ RootlessWrap(ScreenPtr pScreen) s->Glyphs = ps->Glyphs; ps->Glyphs = RootlessGlyphs; } -#endif // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? diff --git a/xserver/miext/rootless/rootlessValTree.c b/xserver/miext/rootless/rootlessValTree.c index 0ee4919e1..e2c4ffe87 100644 --- a/xserver/miext/rootless/rootlessValTree.c +++ b/xserver/miext/rootless/rootlessValTree.c @@ -104,16 +104,13 @@ Equipment Corporation. #include "globals.h" -int RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, - RegionPtr bounding, BoxPtr rect, int x, int y); - int RootlessMiValidateTree (WindowPtr pRoot, WindowPtr pChild, VTKind kind); /* * Compute the visibility of a shaped window */ -int -RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, +static int +RootlessShapedWindowIn (RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y) { BoxRec box; @@ -122,8 +119,8 @@ RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, Bool someIn, someOut; register int t, x1, y1, x2, y2; - nbox = REGION_NUM_RECTS (bounding); - boundBox = REGION_RECTS (bounding); + nbox = RegionNumRects (bounding); + boundBox = RegionRects (bounding); someIn = someOut = FALSE; x1 = rect->x1; y1 = rect->y1; @@ -147,7 +144,7 @@ RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; - switch (RECT_IN_REGION(pScreen, universe, &box)) + switch (RegionContainsRect(universe, &box)) { case rgnIN: if (someOut) @@ -224,7 +221,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, borderSize.y2 = dy; oldVis = pParent->visibility; - switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; @@ -236,7 +233,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, if ((pBounding = wBoundingShape (pParent))) { - switch (RootlessShapedWindowIn (pScreen, universe, + switch (RootlessShapedWindowIn (universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) @@ -285,9 +282,9 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, { if (pChild->visibility != VisibilityFullyObscured) { - REGION_TRANSLATE( pScreen, &pChild->borderClip, + RegionTranslate(&pChild->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pChild->clipList, + RegionTranslate(&pChild->clipList, dx, dy); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) @@ -296,16 +293,14 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, } if (pChild->valdata) { - REGION_NULL(pScreen, - &pChild->valdata->after.borderExposed); + RegionNull(&pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { - REGION_SUBTRACT(pScreen, - &pChild->valdata->after.borderExposed, - &pChild->borderClip, - &pChild->winSize); + RegionSubtract(&pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); } - REGION_NULL(pScreen, &pChild->valdata->after.exposed); + RegionNull(&pChild->valdata->after.exposed); } if (pChild->firstChild) { @@ -334,20 +329,20 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * We translate the old clipList because that will be exposed or copied * if gravity is right. */ - REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + RegionTranslate(&pParent->borderClip, dx, dy); + RegionTranslate(&pParent->clipList, dx, dy); } break; case VTBroken: - REGION_EMPTY (pScreen, &pParent->borderClip); - REGION_EMPTY (pScreen, &pParent->clipList); + RegionEmpty(&pParent->borderClip); + RegionEmpty(&pParent->clipList); break; } borderVisible = pParent->valdata->before.borderVisible; resized = pParent->valdata->before.resized; - REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); - REGION_NULL(pScreen, &pParent->valdata->after.exposed); + RegionNull(&pParent->valdata->after.borderExposed); + RegionNull(&pParent->valdata->after.exposed); /* * Since the borderClip must not be clipped by the children, we do @@ -367,23 +362,23 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * of the border will be saved by DIX in borderVisible -- * use that region and destroy it */ - REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); - REGION_DESTROY( pScreen, borderVisible); + RegionSubtract(exposed, universe, borderVisible); + RegionDestroy(borderVisible); } else { - REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + RegionSubtract(exposed, universe, &pParent->borderClip); } if (HasParentRelativeBorder(pParent) && (dx || dy)) { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, universe, &pParent->winSize); } else { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, exposed, &pParent->winSize); } - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); /* * To get the right clipList for the parent, and to make doubly sure @@ -391,15 +386,15 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * border from the universe before proceeding. */ - REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + RegionIntersect(universe, universe, &pParent->winSize); } else - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); if ((pChild = pParent->firstChild) && pParent->mapped) { - REGION_NULL(pScreen, &childUniverse); - REGION_NULL(pScreen, &childUnion); + RegionNull(&childUniverse); + RegionNull(&childUnion); if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) @@ -407,7 +402,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, for (; pChild; pChild = pChild->nextSib) { if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } else @@ -415,10 +410,10 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) { if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } - REGION_VALIDATE( pScreen, &childUnion, &overlap); + RegionValidate(&childUnion, &overlap); for (pChild = pParent->firstChild; pChild; @@ -435,7 +430,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * Figure out the new universe from the child's * perspective and recurse. */ - REGION_INTERSECT( pScreen, &childUniverse, + RegionIntersect(&childUniverse, universe, &pChild->borderSize); RootlessComputeClips (pChild, pScreen, &childUniverse, @@ -447,14 +442,14 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * other sibling. */ if (overlap) - REGION_SUBTRACT( pScreen, universe, universe, + RegionSubtract(universe, universe, &pChild->borderSize); } } if (!overlap) - REGION_SUBTRACT( pScreen, universe, universe, &childUnion); - REGION_UNINIT( pScreen, &childUnion); - REGION_UNINIT( pScreen, &childUniverse); + RegionSubtract(universe, universe, &childUnion); + RegionUninit(&childUnion); + RegionUninit(&childUniverse); } /* if any children */ /* @@ -467,12 +462,12 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { - REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + RegionCopy(&pParent->valdata->after.exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + RegionSubtract(&pParent->valdata->after.exposed, universe, &pParent->clipList); } @@ -484,7 +479,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, */ if (pParent->backStorage && !resized) { - REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + RegionSubtract(exposed, &pParent->clipList, universe); (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); } @@ -498,7 +493,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, } #ifdef NOTDEF - REGION_COPY( pScreen, &pParent->clipList, universe); + RegionCopy(&pParent->clipList, universe); #endif pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; @@ -589,15 +584,15 @@ RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */ if (pChild == NullWindow) pChild = pRoot->firstChild; - REGION_NULL(pScreen, &childClip); - REGION_NULL(pScreen, &exposed); + RegionNull(&childClip); + RegionNull(&exposed); - if (REGION_BROKEN (pScreen, &pRoot->clipList) && - !REGION_BROKEN (pScreen, &pRoot->borderClip)) + if (RegionBroken(&pRoot->clipList) && + !RegionBroken(&pRoot->borderClip)) { // fixme this might not work, but hopefully doesn't happen anyway. kind = VTBroken; - REGION_EMPTY (pScreen, &pRoot->clipList); + RegionEmpty(&pRoot->clipList); ErrorF("ValidateTree: BUSTED!\n"); } @@ -613,28 +608,28 @@ RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */ { if (pWin->viewable) { if (pWin->valdata) { - REGION_COPY( pScreen, &childClip, &pWin->borderSize); + RegionCopy(&childClip, &pWin->borderSize); RootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed); } else if (pWin->visibility == VisibilityNotViewable) { RootlessTreeObscured(pWin); } } else { if (pWin->valdata) { - REGION_EMPTY( pScreen, &pWin->clipList); + RegionEmpty(&pWin->clipList); if (pScreen->ClipNotify) (* pScreen->ClipNotify) (pWin, 0, 0); - REGION_EMPTY( pScreen, &pWin->borderClip); + RegionEmpty(&pWin->borderClip); pWin->valdata = NULL; } } } - REGION_UNINIT(pScreen, &childClip); + RegionUninit(&childClip); /* The root is never clipped by its children, so nothing on the root is ever exposed by moving or mapping its children. */ - REGION_NULL(pScreen, &pRoot->valdata->after.exposed); - REGION_NULL(pScreen, &pRoot->valdata->after.borderExposed); + RegionNull(&pRoot->valdata->after.exposed); + RegionNull(&pRoot->valdata->after.borderExposed); return 1; } diff --git a/xserver/miext/rootless/rootlessWindow.c b/xserver/miext/rootless/rootlessWindow.c index 55c7b9689..c1c6bdbfd 100644 --- a/xserver/miext/rootless/rootlessWindow.c +++ b/xserver/miext/rootless/rootlessWindow.c @@ -53,9 +53,9 @@ extern Bool no_configure_window; #ifdef ROOTLESS_GLOBAL_COORDS #define SCREEN_TO_GLOBAL_X \ - (dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX) + (pScreen->x + rootlessGlobalOffsetX) #define SCREEN_TO_GLOBAL_Y \ - (dixScreenOrigins[pScreen->myNum].y + rootlessGlobalOffsetY) + (pScreen->y + rootlessGlobalOffsetY) #else #define SCREEN_TO_GLOBAL_X 0 #define SCREEN_TO_GLOBAL_Y 0 @@ -109,8 +109,8 @@ void RootlessNativeWindowMoved (WindowPtr pWin) { if (xp_get_window_bounds (MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return; - sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; + sx = pWin->drawable.pScreen->x + darwinMainScreenX; + sy = pWin->drawable.pScreen->y + darwinMainScreenY; /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */ vlist[0] = (INT16) bounds.x1 - sx; @@ -179,15 +179,13 @@ RootlessCreateWindow(WindowPtr pWin) static void RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec) { - ScreenPtr pScreen = pWin->drawable.pScreen; - - SCREENREC(pScreen)->imp->DestroyFrame(winRec->wid); + SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid); #ifdef ROOTLESS_TRACK_DAMAGE - REGION_UNINIT(pScreen, &winRec->damage); + RegionUninit(&winRec->damage); #endif - xfree(winRec); + free(winRec); SETWINREC(pWin, NULL); } @@ -218,23 +216,15 @@ RootlessDestroyWindow(WindowPtr pWin) static Bool RootlessGetShape(WindowPtr pWin, RegionPtr pShape) { - ScreenPtr pScreen = pWin->drawable.pScreen; - - /* - * Avoid a warning. - * REGION_NULL and the other macros don't actually seem to use pScreen. - */ - (void)pScreen; - if (wBoundingShape(pWin) == NULL) return FALSE; /* wBoundingShape is relative to *inner* origin of window. Translate by borderWidth to get the outside-relative position. */ - REGION_NULL(pScreen, pShape); - REGION_COPY(pScreen, pShape, wBoundingShape(pWin)); - REGION_TRANSLATE(pScreen, pShape, pWin->borderWidth, pWin->borderWidth); + RegionNull(pShape); + RegionCopy(pShape, wBoundingShape(pWin)); + RegionTranslate(pShape, pWin->borderWidth, pWin->borderWidth); return TRUE; } @@ -247,7 +237,6 @@ RootlessGetShape(WindowPtr pWin, RegionPtr pShape) static void RootlessReshapeFrame(WindowPtr pWin) { RootlessWindowRec *winRec = WINREC(pWin); - ScreenPtr pScreen = pWin->drawable.pScreen; RegionRec newShape; RegionPtr pShape; @@ -266,7 +255,7 @@ static void RootlessReshapeFrame(WindowPtr pWin) RL_DEBUG_MSG("reshaping..."); if (pShape != NULL) { RL_DEBUG_MSG("numrects %d, extents %d %d %d %d ", - REGION_NUM_RECTS(&newShape), + RegionNumRects(&newShape), newShape.extents.x1, newShape.extents.y1, newShape.extents.x2, newShape.extents.y2); } else { @@ -274,10 +263,10 @@ static void RootlessReshapeFrame(WindowPtr pWin) } #endif - SCREENREC(pScreen)->imp->ReshapeFrame(winRec->wid, pShape); + SCREENREC(pWin->drawable.pScreen)->imp->ReshapeFrame(winRec->wid, pShape); if (pShape != NULL) - REGION_UNINIT(pScreen, &newShape); + RegionUninit(&newShape); } @@ -288,12 +277,12 @@ static void RootlessReshapeFrame(WindowPtr pWin) * shaped when the window is framed. */ void -RootlessSetShape(WindowPtr pWin) +RootlessSetShape(WindowPtr pWin, int kind) { ScreenPtr pScreen = pWin->drawable.pScreen; SCREEN_UNWRAP(pScreen, SetShape); - pScreen->SetShape(pWin); + pScreen->SetShape(pWin, kind); SCREEN_WRAP(pScreen, SetShape); RootlessReshapeFrame(pWin); @@ -355,8 +344,8 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y) #ifdef ROOTLESS_TRACK_DAMAGE // Move damaged region to correspond to new window position - if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { - REGION_TRANSLATE(pScreen, &winRec->damage, + if (RegionNotEmpty(&winRec->damage)) { + RegionTranslate(&winRec->damage, x - bw - winRec->x, y - bw - winRec->y); } @@ -394,7 +383,7 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec) winRec->borderWidth = bw; #ifdef ROOTLESS_TRACK_DAMAGE - REGION_NULL(pScreen, &winRec->damage); + RegionNull(&winRec->damage); #endif } @@ -421,7 +410,7 @@ RootlessEnsureFrame(WindowPtr pWin) if (pWin->drawable.class != InputOutput) return NULL; - winRec = xalloc(sizeof(RootlessWindowRec)); + winRec = malloc(sizeof(RootlessWindowRec)); if (!winRec) return NULL; @@ -448,7 +437,7 @@ RootlessEnsureFrame(WindowPtr pWin) pShape)) { RL_DEBUG_MSG("implementation failed to create frame!\n"); - xfree(winRec); + free(winRec); SETWINREC(pWin, NULL); return NULL; } @@ -457,7 +446,7 @@ RootlessEnsureFrame(WindowPtr pWin) RootlessFlushWindowColormap(pWin); if (pShape != NULL) - REGION_UNINIT(pScreen, &shape); + RegionUninit(&shape); return winRec; } @@ -592,10 +581,15 @@ RootlessReorderWindow(WindowPtr pWin) RootlessStopDrawing(pWin, FALSE); - /* Find the next window above this one that has a mapped frame. */ + /* Find the next window above this one that has a mapped frame. + * Only include cases where the windows are in the same category of + * hittability to ensure offscreen windows dont get restacked + * relative to onscreen ones (but that the offscreen ones maintain + * their stacking order if they are explicitly asked to Reorder + */ newPrevW = pWin->prevSib; - while (newPrevW && (WINREC(newPrevW) == NULL || !newPrevW->realized)) + while (newPrevW && (WINREC(newPrevW) == NULL || !newPrevW->realized || newPrevW->rootlessUnhittable != pWin->rootlessUnhittable)) newPrevW = newPrevW->prevSib; newPrev = newPrevW != NULL ? WINREC(newPrevW) : NULL; @@ -673,7 +667,7 @@ RootlessNoCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RL_DEBUG_MSG("ROOTLESSNOCOPYWINDOW "); - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); } @@ -705,9 +699,9 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_NULL(pScreen, &rgnDst); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionNull(&rgnDst); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); if (gResizeDeathCount == 1) { /* Simple case, we only have a single source pixmap. */ @@ -724,21 +718,21 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, intersect the destination with each source and copy those bits. */ for (i = 0; i < gResizeDeathCount; i++) { - REGION_INIT(pScreen, &clip, gResizeDeathBounds + 0, 1); - REGION_NULL(pScreen, &clipped); - REGION_INTERSECT(pScreen, &rgnDst, &clip, &clipped); + RegionInit(&clip, gResizeDeathBounds + 0, 1); + RegionNull(&clipped); + RegionIntersect(&rgnDst, &clip, &clipped); fbCopyRegion(&gResizeDeathPix[i]->drawable, &pScreen->GetWindowPixmap(pWin)->drawable, 0, &clipped, dx, dy, fbCopyWindowProc, 0, 0); - REGION_UNINIT(pScreen, &clipped); - REGION_UNINIT(pScreen, &clip); + RegionUninit(&clipped); + RegionUninit(&clip); } } /* Don't update - resize will update everything */ - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); fbValidateDrawable(&pWin->drawable); @@ -768,12 +762,12 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); - REGION_NULL(pScreen, &rgnDst); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionNull(&rgnDst); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - extents = REGION_EXTENTS(pScreen, &rgnDst); + extents = RegionExtents(&rgnDst); area = (extents->x2 - extents->x1) * (extents->y2 - extents->y1); /* If the area exceeds threshold, use the implementation's @@ -797,13 +791,13 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } /* Move region to window local coords */ - REGION_TRANSLATE(pScreen, &rgnDst, -winRec->x, -winRec->y); + RegionTranslate(&rgnDst, -winRec->x, -winRec->y); RootlessStopDrawing(pWin, FALSE); SCREENREC(pScreen)->imp->CopyWindow(winRec->wid, - REGION_NUM_RECTS(&rgnDst), - REGION_RECTS(&rgnDst), + RegionNumRects(&rgnDst), + RegionRects(&rgnDst), dx, dy); } else { @@ -817,7 +811,7 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } out: - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); fbValidateDrawable(&pWin->drawable); SCREEN_WRAP(pScreen, CopyWindow); @@ -984,7 +978,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity, copy_rect_width = copy_rect.x2 - copy_rect.x1; copy_rect_height = copy_rect.y2 - copy_rect.y1; copy_rowbytes = ((copy_rect_width * Bpp) + 31) & ~31; - gResizeDeathBits = xalloc(copy_rowbytes + gResizeDeathBits = malloc(copy_rowbytes * copy_rect_height); if (copy_rect_width * copy_rect_height > @@ -1028,7 +1022,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity, RootlessStartDrawing(pWin); - gResizeDeathBits = xalloc(winRec->bytesPerRow * winRec->height); + gResizeDeathBits = malloc(winRec->bytesPerRow * winRec->height); memcpy(gResizeDeathBits, winRec->pixelData, winRec->bytesPerRow * winRec->height); @@ -1170,7 +1164,7 @@ FinishFrameResize(WindowPtr pWin, Bool gravity, int oldX, int oldY, } if (gResizeDeathBits != NULL) { - xfree(gResizeDeathBits); + free(gResizeDeathBits); gResizeDeathBits = NULL; } @@ -1320,11 +1314,18 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y, box.x1 = x; box.y1 = y; box.x2 = x + w; box.y2 = y + h; - REGION_UNINIT(pScreen, &pWin->winSize); - REGION_INIT(pScreen, &pWin->winSize, &box, 1); - REGION_COPY(pScreen, &pWin->borderSize, &pWin->winSize); - REGION_COPY(pScreen, &pWin->clipList, &pWin->winSize); - REGION_COPY(pScreen, &pWin->borderClip, &pWin->winSize); + RegionUninit(&pWin->winSize); + RegionInit(&pWin->winSize, &box, 1); + RegionCopy(&pWin->borderSize, &pWin->winSize); + RegionCopy(&pWin->clipList, &pWin->winSize); + RegionCopy(&pWin->borderClip, &pWin->winSize); + + if (winRec) { + SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen, + x + SCREEN_TO_GLOBAL_X, + y + SCREEN_TO_GLOBAL_Y, + w, h, RL_GRAVITY_NONE); + } miSendExposures(pWin, &pWin->borderClip, pWin->drawable.x, pWin->drawable.y); @@ -1506,7 +1507,7 @@ RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) * (i.e in front of Aqua windows) -- called when X11.app is given focus */ void -RootlessOrderAllWindows (void) +RootlessOrderAllWindows (Bool include_unhitable) { int i; WindowPtr pWin; @@ -1517,12 +1518,13 @@ RootlessOrderAllWindows (void) RL_DEBUG_MSG("RootlessOrderAllWindows() "); for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i] == NULL) continue; - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { if (!pWin->realized) continue; if (RootlessEnsureFrame(pWin) == NULL) continue; + if (!include_unhitable && pWin->rootlessUnhittable) continue; RootlessReorderWindow (pWin); } } @@ -1533,7 +1535,7 @@ void RootlessEnableRoot (ScreenPtr pScreen) { WindowPtr pRoot; - pRoot = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; RootlessEnsureFrame (pRoot); (*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE); @@ -1546,7 +1548,7 @@ RootlessDisableRoot (ScreenPtr pScreen) WindowPtr pRoot; RootlessWindowRec *winRec; - pRoot = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; winRec = WINREC (pRoot); if (NULL == winRec) @@ -1572,8 +1574,10 @@ RootlessHideAllWindows (void) for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; - pWin = WindowTable[i]; - if (pScreen == NULL || pWin == NULL) + if (pScreen == NULL) + continue; + pWin = pScreen->root; + if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) @@ -1609,8 +1613,10 @@ RootlessShowAllWindows (void) for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; - pWin = WindowTable[i]; - if (pScreen == NULL || pWin == NULL) + if (pScreen == NULL) + continue; + pWin = pScreen->root; + if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) diff --git a/xserver/miext/rootless/rootlessWindow.h b/xserver/miext/rootless/rootlessWindow.h index ca104a4d7..2b018e007 100644 --- a/xserver/miext/rootless/rootlessWindow.h +++ b/xserver/miext/rootless/rootlessWindow.h @@ -39,7 +39,7 @@ Bool RootlessCreateWindow(WindowPtr pWin); Bool RootlessDestroyWindow(WindowPtr pWin); -void RootlessSetShape(WindowPtr pWin); +void RootlessSetShape(WindowPtr pWin, int kind); Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); diff --git a/xserver/miext/shadow/Makefile.in b/xserver/miext/shadow/Makefile.in index 95bc17bcc..671d06d23 100644 --- a/xserver/miext/shadow/Makefile.in +++ b/xserver/miext/shadow/Makefile.in @@ -124,10 +124,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -215,6 +211,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -229,6 +227,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -246,10 +245,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -305,10 +308,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -326,17 +330,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -363,20 +361,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -468,6 +469,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/shadow/shadow.c b/xserver/miext/shadow/shadow.c index 608ccd234..cb1b299fe 100644 --- a/xserver/miext/shadow/shadow.c +++ b/xserver/miext/shadow/shadow.c @@ -36,8 +36,8 @@ #include "gcstruct.h" #include "shadow.h" -static int shadowScrPrivateKeyIndex; -DevPrivateKey shadowScrPrivateKey = &shadowScrPrivateKeyIndex; +static DevPrivateKeyRec shadowScrPrivateKeyRec; +#define shadowScrPrivateKey (&shadowScrPrivateKeyRec) #define wrap(priv, real, mem) {\ priv->mem = real->mem; \ @@ -57,7 +57,7 @@ shadowRedisplay(ScreenPtr pScreen) if (!pBuf || !pBuf->pDamage || !pBuf->update) return; pRegion = DamageRegion(pBuf->pDamage); - if (REGION_NOTEMPTY(pScreen, pRegion)) { + if (RegionNotEmpty(pRegion)) { (*pBuf->update)(pScreen, pBuf); DamageEmpty(pBuf->pDamage); } @@ -103,11 +103,11 @@ shadowCloseScreen(int i, ScreenPtr pScreen) shadowRemove(pScreen, pBuf->pPixmap); DamageDestroy(pBuf->pDamage); #ifdef BACKWARDS_COMPATIBILITY - REGION_UNINIT(pScreen, &pBuf->damage); /* bc */ + RegionUninit(&pBuf->damage); /* bc */ #endif if (pBuf->pPixmap) pScreen->DestroyPixmap(pBuf->pPixmap); - xfree(pBuf); + free(pBuf); return pScreen->CloseScreen(i, pScreen); } @@ -121,13 +121,13 @@ shadowReportFunc(DamagePtr pDamage, RegionPtr pRegion, void *closure) /* Register the damaged region, use DamageReportNone below when we * want to break BC below... */ - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, pRegion); + RegionUnion(&pDamage->damage, &pDamage->damage, pRegion); /* * BC hack. In 7.0 and earlier several drivers would inspect the * 'damage' member directly, so we have to keep it existing. */ - REGION_COPY(pScreen, &pBuf->damage, pRegion); + RegionCopy(&pBuf->damage, pRegion); } #endif @@ -136,10 +136,13 @@ shadowSetup(ScreenPtr pScreen) { shadowBufPtr pBuf; + if (!dixRegisterPrivateKey(&shadowScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!DamageSetup(pScreen)) return FALSE; - pBuf = xalloc(sizeof(shadowBufRec)); + pBuf = malloc(sizeof(shadowBufRec)); if (!pBuf) return FALSE; #ifdef BACKWARDS_COMPATIBILITY @@ -154,7 +157,7 @@ shadowSetup(ScreenPtr pScreen) TRUE, pScreen, pScreen); #endif if (!pBuf->pDamage) { - xfree(pBuf); + free(pBuf); return FALSE; } @@ -166,7 +169,7 @@ shadowSetup(ScreenPtr pScreen) pBuf->closure = 0; pBuf->randr = 0; #ifdef BACKWARDS_COMPATIBILITY - REGION_NULL(pScreen, &pBuf->damage); /* bc */ + RegionNull(&pBuf->damage); /* bc */ #endif dixSetPrivate(&pScreen->devPrivates, shadowScrPrivateKey, pBuf); diff --git a/xserver/miext/shadow/shadow.h b/xserver/miext/shadow/shadow.h index ef85c0bb9..f4473052d 100644 --- a/xserver/miext/shadow/shadow.h +++ b/xserver/miext/shadow/shadow.h @@ -26,9 +26,7 @@ #include "scrnintstr.h" -#ifdef RENDER #include "picturestr.h" -#endif #include "damage.h" #include "damagestr.h" diff --git a/xserver/miext/shadow/shalloc.c b/xserver/miext/shadow/shalloc.c index 5c01f2aac..f57cb5266 100644 --- a/xserver/miext/shadow/shalloc.c +++ b/xserver/miext/shadow/shalloc.c @@ -1,6 +1,4 @@ /* - * $XFree86$ - * * Copyright © 2000 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its @@ -47,6 +45,6 @@ shadowAlloc (int width, int height, int bpp) /* Cant use PixmapBytePad -- the structure is probably not initialized yet */ stride = BitmapBytePad (width * bpp); - fb = xalloc (stride * height); + fb = malloc(stride * height); return fb; } diff --git a/xserver/miext/shadow/shpacked.c b/xserver/miext/shadow/shpacked.c index 6736162e2..20d2ea19e 100644 --- a/xserver/miext/shadow/shpacked.c +++ b/xserver/miext/shadow/shpacked.c @@ -46,8 +46,8 @@ shadowUpdatePacked (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBase, *shaLine, *sha; FbStride shaStride; int scrBase, scrLine, scr; diff --git a/xserver/miext/shadow/shplanar.c b/xserver/miext/shadow/shplanar.c index b5983dc73..9ca3f3f89 100644 --- a/xserver/miext/shadow/shplanar.c +++ b/xserver/miext/shadow/shplanar.c @@ -92,8 +92,8 @@ shadowUpdatePlanar4 (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); CARD32 *shaBase, *shaLine, *sha; FbStride shaStride; int scrBase, scrLine, scr; diff --git a/xserver/miext/shadow/shplanar8.c b/xserver/miext/shadow/shplanar8.c index 6d8defa58..f8b255d8f 100644 --- a/xserver/miext/shadow/shplanar8.c +++ b/xserver/miext/shadow/shplanar8.c @@ -95,8 +95,8 @@ shadowUpdatePlanar4x8 (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); CARD32 *shaBase, *shaLine, *sha; CARD8 s1, s2, s3, s4; FbStride shaStride; diff --git a/xserver/miext/shadow/shrotate.c b/xserver/miext/shadow/shrotate.c index 673cd76b5..c3898266c 100644 --- a/xserver/miext/shadow/shrotate.c +++ b/xserver/miext/shadow/shrotate.c @@ -54,8 +54,8 @@ shadowUpdateRotatePacked (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBits; FbStride shaStride; int shaBpp; diff --git a/xserver/miext/shadow/shrotpack.h b/xserver/miext/shadow/shrotpack.h index 015a98595..2d1a87c19 100644 --- a/xserver/miext/shadow/shrotpack.h +++ b/xserver/miext/shadow/shrotpack.h @@ -99,8 +99,8 @@ FUNC (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBits; Data *shaBase, *shaLine, *sha; FbStride shaStride; diff --git a/xserver/miext/shadow/shrotpackYX.h b/xserver/miext/shadow/shrotpackYX.h index f823552d3..7d36bd1bd 100644 --- a/xserver/miext/shadow/shrotpackYX.h +++ b/xserver/miext/shadow/shrotpackYX.h @@ -1,6 +1,4 @@ /* - * $Id: shrotpackYX.h,v 1.1 2006/11/26 18:15:06 matthieu Exp $ - * * Copyright © 2004 Philip Blundell * * Permission to use, copy, modify, distribute, and sell this software and its @@ -65,8 +63,8 @@ FUNC (ScreenPtr pScreen, { RegionPtr damage = shadowDamage(pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBits; Data *shaBase, *shaLine, *sha; FbStride shaStride, winStride; |