summaryrefslogtreecommitdiff
path: root/xserver/miext/rootless
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-12-05 15:36:12 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-12-05 15:36:12 +0000
commita90ee792d96752ad1b71b9ada922fa6afe478c99 (patch)
tree6143b00f7646951d23dfe2a4fe2992ca40b77069 /xserver/miext/rootless
parentbc97d4ecc0aa9e1b823565b07282f848700bd11a (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/rootless')
-rw-r--r--xserver/miext/rootless/Makefile.in30
-rw-r--r--xserver/miext/rootless/rootless.h4
-rw-r--r--xserver/miext/rootless/rootlessCommon.c60
-rw-r--r--xserver/miext/rootless/rootlessCommon.h21
-rw-r--r--xserver/miext/rootless/rootlessGC.c2
-rw-r--r--xserver/miext/rootless/rootlessScreen.c44
-rw-r--r--xserver/miext/rootless/rootlessValTree.c111
-rw-r--r--xserver/miext/rootless/rootlessWindow.c142
-rw-r--r--xserver/miext/rootless/rootlessWindow.h2
9 files changed, 210 insertions, 206 deletions
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, &region, pBox, 1);
+ RegionInit(&region, pBox, 1);
RootlessDamageRegion(pWindow, &region);
- REGION_UNINIT(pWindow->drawable.pScreen, &region); /* no-op */
+ RegionUninit(&region); /* 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, &region, &box, 1);
+ RegionInit(&region, &box, 1);
RootlessDamageRegion(pWindow, &region);
- REGION_UNINIT(pWindow->drawable.pScreen, &region); /* no-op */
+ RegionUninit(&region); /* 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);