[PATCH 1/5] dix: remove layer window argument to MarkOverlappedWindows
Adam Jackson
ajax at redhat.com
Tue Feb 17 15:59:42 PST 2015
In theory this is an optimization for the overlay case, so it can tell
the mi code where to start walking in ValidateTree. In practice all the
in-tree implementations just fill it in with pWin (yes even mioverlay),
so it's not optimizing anything. Remove the argument and constprop
values accordingly.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
composite/compalloc.c | 33 +++++++++------------
dix/window.c | 49 ++++++++++++-------------------
doc/Xserver-spec.xml | 11 ++-----
hw/dmx/dmxextension.c | 6 ++--
include/scrnintstr.h | 3 +-
mi/mi.h | 3 +-
mi/mioverlay.c | 24 +++++++---------
mi/miwindow.c | 64 ++++++++++++++---------------------------
miext/rootless/rootlessScreen.c | 8 ++----
9 files changed, 72 insertions(+), 129 deletions(-)
diff --git a/composite/compalloc.c b/composite/compalloc.c
index 8daded0..22526ee 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -101,31 +101,28 @@ compDestroyDamage(DamagePtr pDamage, void *closure)
}
static Bool
-compMarkWindows(WindowPtr pWin, WindowPtr *ppLayerWin)
+compMarkWindows(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
- WindowPtr pLayerWin = pWin;
if (!pWin->viewable)
return FALSE;
- (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin);
- (*pScreen->MarkWindow) (pLayerWin->parent);
-
- *ppLayerWin = pLayerWin;
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin);
+ (*pScreen->MarkWindow) (pWin->parent);
return TRUE;
}
static void
-compHandleMarkedWindows(WindowPtr pWin, WindowPtr pLayerWin)
+compHandleMarkedWindows(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
- (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther);
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->ValidateTree) (pWin->parent, pWin, VTOther);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin, VTOther);
+ (*pScreen->PostValidateTree) (pWin->parent, pWin, VTOther);
}
/*
@@ -137,7 +134,6 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
CompWindowPtr cw = GetCompWindow(pWin);
CompClientWindowPtr ccw;
CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen);
- WindowPtr pLayerWin;
Bool anyMarked = FALSE;
if (pWin == cs->pOverlayWin) {
@@ -184,7 +180,7 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
return BadAlloc;
}
- anyMarked = compMarkWindows(pWin, &pLayerWin);
+ anyMarked = compMarkWindows(pWin);
RegionNull(&cw->borderClip);
cw->update = CompositeRedirectAutomatic;
@@ -202,7 +198,7 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
return BadAlloc;
if (ccw->update == CompositeRedirectManual) {
if (!anyMarked)
- anyMarked = compMarkWindows(pWin, &pLayerWin);
+ anyMarked = compMarkWindows(pWin);
if (cw->damageRegistered) {
DamageUnregister(cw->damage);
@@ -212,7 +208,7 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
}
else if (cw->update == CompositeRedirectAutomatic && !cw->damageRegistered) {
if (!anyMarked)
- anyMarked = compMarkWindows(pWin, &pLayerWin);
+ anyMarked = compMarkWindows(pWin);
}
if (!compCheckRedirect(pWin)) {
@@ -221,7 +217,7 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
}
if (anyMarked)
- compHandleMarkedWindows(pWin, pLayerWin);
+ compHandleMarkedWindows(pWin);
return Success;
}
@@ -264,7 +260,6 @@ compFreeClientWindow(WindowPtr pWin, XID id)
CompWindowPtr cw = GetCompWindow(pWin);
CompClientWindowPtr ccw, *prev;
Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
PixmapPtr pPixmap = NULL;
if (!cw)
@@ -279,7 +274,7 @@ compFreeClientWindow(WindowPtr pWin, XID id)
}
}
if (!cw->clients) {
- anyMarked = compMarkWindows(pWin, &pLayerWin);
+ anyMarked = compMarkWindows(pWin);
if (pWin->redirectDraw != RedirectDrawNone) {
pPixmap = (*pScreen->GetWindowPixmap) (pWin);
@@ -296,7 +291,7 @@ compFreeClientWindow(WindowPtr pWin, XID id)
}
else if (cw->update == CompositeRedirectAutomatic &&
!cw->damageRegistered && pWin->redirectDraw != RedirectDrawNone) {
- anyMarked = compMarkWindows(pWin, &pLayerWin);
+ anyMarked = compMarkWindows(pWin);
DamageRegister(&pWin->drawable, cw->damage);
cw->damageRegistered = TRUE;
@@ -305,7 +300,7 @@ compFreeClientWindow(WindowPtr pWin, XID id)
}
if (anyMarked)
- compHandleMarkedWindows(pWin, pLayerWin);
+ compHandleMarkedWindows(pWin);
if (pPixmap) {
compRestoreWindow(pWin, pPixmap);
diff --git a/dix/window.c b/dix/window.c
index d49276c..7c1a585 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2042,7 +2042,6 @@ ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind)
Bool WasViewable = (Bool) pWin->viewable;
Bool anyMarked;
WindowPtr pFirstChange;
- WindowPtr pLayerWin;
ScreenPtr pScreen = pWin->drawable.pScreen;
/* if this is a root window, can't be restacked */
@@ -2052,15 +2051,12 @@ ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind)
pFirstChange = MoveWindowInStack(pWin, pSib);
if (WasViewable) {
- anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange,
- &pLayerWin);
- if (pLayerWin != pWin)
- pFirstChange = pLayerWin;
+ anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange);
if (anyMarked) {
- (*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, kind);
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->ValidateTree) (pWin->parent, pFirstChange, kind);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pWin->drawable.pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
+ (*pScreen->PostValidateTree) (pWin->parent, pFirstChange,
kind);
}
}
@@ -2543,9 +2539,7 @@ int
MapWindow(WindowPtr pWin, ClientPtr client)
{
ScreenPtr pScreen;
-
WindowPtr pParent;
- WindowPtr pLayerWin;
if (pWin->mapped)
return Success;
@@ -2571,14 +2565,12 @@ MapWindow(WindowPtr pWin, ClientPtr client)
return Success;
RealizeTree(pWin);
if (pWin->viewable) {
- anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin,
- &pLayerWin);
+ anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin);
if (anyMarked) {
- (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTMap);
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->ValidateTree) (pWin->parent, pWin, VTMap);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
- VTMap);
+ (*pScreen->PostValidateTree) (pWin->parent, pWin, VTMap);
}
}
WindowsRestructured();
@@ -2640,8 +2632,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
if (pParent->realized) {
RealizeTree(pWin);
if (pWin->viewable) {
- anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin,
- NULL);
+ anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin);
}
}
}
@@ -2651,7 +2642,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
pLayerWin = (*pScreen->GetLayerWindow) (pParent);
if (pLayerWin->parent != pParent) {
anyMarked |= (*pScreen->MarkOverlappedWindows) (pLayerWin,
- pLayerWin, NULL);
+ pLayerWin);
pFirstMapped = pLayerWin;
}
if (anyMarked) {
@@ -2736,7 +2727,6 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
Bool wasRealized = (Bool) pWin->realized;
Bool wasViewable = (Bool) pWin->viewable;
ScreenPtr pScreen = pWin->drawable.pScreen;
- WindowPtr pLayerWin = pWin;
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
return Success;
@@ -2744,18 +2734,18 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
DeliverUnmapNotify(pWin, fromConfigure);
if (wasViewable && !fromConfigure) {
pWin->valdata = UnmapValData;
- (*pScreen->MarkOverlappedWindows) (pWin, pWin->nextSib, &pLayerWin);
- (*pScreen->MarkWindow) (pLayerWin->parent);
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin->nextSib);
+ (*pScreen->MarkWindow) (pWin->parent);
}
pWin->mapped = FALSE;
if (wasRealized)
UnrealizeTree(pWin, fromConfigure);
if (wasViewable) {
if (!fromConfigure) {
- (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->ValidateTree) (pWin->parent, pWin, VTUnmap);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
+ (*pScreen->PostValidateTree) (pWin->parent, pWin, VTUnmap);
}
}
if (wasRealized && !fromConfigure) {
@@ -2810,7 +2800,7 @@ UnmapSubwindows(WindowPtr pWin)
else {
WindowPtr ptmp;
- (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin);
(*pScreen->MarkWindow) (pLayerWin->parent);
/* Windows between pWin and pLayerWin may not have been marked */
@@ -3531,7 +3521,6 @@ SetRootClip(ScreenPtr pScreen, Bool enable)
WindowPtr pChild;
Bool WasViewable;
Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
BoxRec box;
if (!pWin)
@@ -3539,8 +3528,7 @@ SetRootClip(ScreenPtr pScreen, Bool enable)
WasViewable = (Bool) (pWin->viewable);
if (WasViewable) {
for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) {
- (void) (*pScreen->MarkOverlappedWindows) (pChild,
- pChild, &pLayerWin);
+ (void) (*pScreen->MarkOverlappedWindows) (pChild, pChild);
}
(*pScreen->MarkWindow) (pWin);
anyMarked = TRUE;
@@ -3585,8 +3573,7 @@ SetRootClip(ScreenPtr pScreen, Bool enable)
if (WasViewable) {
if (pWin->firstChild) {
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild,
- pWin->firstChild,
- NULL);
+ pWin->firstChild);
}
else {
(*pScreen->MarkWindow) (pWin);
diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml
index 4c34419..2845b2e 100644
--- a/doc/Xserver-spec.xml
+++ b/doc/Xserver-spec.xml
@@ -3476,17 +3476,13 @@ that ValidateTree has the information it needs to validate the window.</para>
<para>
<blockquote><programlisting>
- Bool pScreen->MarkOverlappedWindows(parent, firstChild, ppLayerWin)
+ Bool pScreen->MarkOverlappedWindows(parent, firstChild)
WindowPtr parent;
WindowPtr firstChild;
- WindowPtr * ppLayerWin;
</programlisting></blockquote>
This formerly dix function MarkWindow has moved to ddx and is accessed
-via this screen function. In the process, it has grown another
-parameter: ppLayerWin, which is filled in with a pointer to the window
-at which save under marking and ValidateTree should begin. In the
-single-layered framebuffer case, pLayerWin == pWin.</para>
+via this screen function.</para>
<para>
<blockquote><programlisting>
@@ -3496,8 +3492,7 @@ single-layered framebuffer case, pLayerWin == pWin.</para>
</programlisting></blockquote>
The dix functions ChangeSaveUnder and CheckSaveUnder have moved to ddx and
-are accessed via this screen function. pLayerWin should be the window
-returned in the ppLayerWin parameter of MarkOverlappedWindows. The function
+are accessed via this screen function. The function
may turn on backing store for windows that might be covered, and may partially
turn off backing store for windows. It returns TRUE if PostChangeSaveUnder
needs to be called to finish turning off backing store.</para>
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index fcc97e3..7886d05 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -361,8 +361,7 @@ dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
/* Recompute this screen's window's clip rects as follows: */
/* 1. Mark all of root's children's windows */
for (pChild = pRoot->firstChild; pChild; pChild = pChild->nextSib)
- anyMarked |= pScreen->MarkOverlappedWindows(pChild, pChild,
- (WindowPtr *) NULL);
+ anyMarked |= pScreen->MarkOverlappedWindows(pChild, pChild);
/* 2. Set the root window's borderClip */
pRoot->borderClip.extents.x1 = 0;
@@ -1041,8 +1040,7 @@ dmxForceExposures(int idx)
WindowPtr pChild;
for (pChild = pRoot->firstChild; pChild; pChild = pChild->nextSib)
- anyMarked |= pScreen->MarkOverlappedWindows(pChild, pChild,
- (WindowPtr *) NULL);
+ anyMarked |= pScreen->MarkOverlappedWindows(pChild, pChild);
if (anyMarked) {
/* If any windows have been marked, set the root window's
* clipList to be broken since it will be recalculated in
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index faf0563..4c73bd4 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -282,8 +282,7 @@ typedef void (*SetScreenPixmapProcPtr) (PixmapPtr /*pPix */ );
typedef void (*MarkWindowProcPtr) (WindowPtr /*pWin */ );
typedef Bool (*MarkOverlappedWindowsProcPtr) (WindowPtr /*parent */ ,
- WindowPtr /*firstChild */ ,
- WindowPtr * /*pLayerWin */ );
+ WindowPtr /*firstChild */ );
typedef int (*ConfigNotifyProcPtr) (WindowPtr /*pWin */ ,
int /*x */ ,
diff --git a/mi/mi.h b/mi/mi.h
index db62c91..fa703d0 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -440,8 +440,7 @@ extern _X_EXPORT void miMarkWindow(WindowPtr /*pWin */
);
extern _X_EXPORT Bool miMarkOverlappedWindows(WindowPtr /*pWin */ ,
- WindowPtr /*pFirst */ ,
- WindowPtr * /*ppLayerWin */
+ WindowPtr /*pFirst */
);
extern _X_EXPORT void miHandleValidateExposures(WindowPtr /*pWin */
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 2b20fd7..423e022 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -74,7 +74,7 @@ static Bool miOverlayRealizeWindow(WindowPtr);
static void miOverlayMarkWindow(WindowPtr);
static void miOverlayReparentWindow(WindowPtr, WindowPtr);
static void miOverlayRestackWindow(WindowPtr, WindowPtr);
-static Bool miOverlayMarkOverlappedWindows(WindowPtr, WindowPtr, WindowPtr *);
+static Bool miOverlayMarkOverlappedWindows(WindowPtr, WindowPtr);
static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool);
static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind);
static void miOverlayHandleExposures(WindowPtr);
@@ -324,8 +324,7 @@ miOverlayRestackWindow(WindowPtr pWin, WindowPtr oldNextSib)
}
static Bool
-miOverlayMarkOverlappedWindows(WindowPtr pWin,
- WindowPtr pFirst, WindowPtr *pLayerWin)
+miOverlayMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst)
{
WindowPtr pChild, pLast;
Bool overMarked, underMarked, doUnderlay, markAll;
@@ -334,9 +333,6 @@ miOverlayMarkOverlappedWindows(WindowPtr pWin,
overMarked = underMarked = markAll = FALSE;
- if (pLayerWin)
- *pLayerWin = pWin; /* hah! */
-
doUnderlay = (IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin));
box = RegionExtents(&pWin->borderSize);
@@ -933,7 +929,7 @@ miOverlayMoveWindow(WindowPtr pWin,
RegionCopy(&overReg, &pWin->borderClip);
CollectUnderlayChildrenRegions(pWin, &underReg);
}
- (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin);
}
pWin->origin.x = x + (int) bw;
pWin->origin.y = y + (int) bw;
@@ -952,7 +948,7 @@ miOverlayMoveWindow(WindowPtr pWin,
if (WasViewable) {
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
- (*pScreen->MarkOverlappedWindows) (pWin, windowToValidate, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, windowToValidate);
(*pScreen->ValidateTree) (pWin->parent, NullWindow, kind);
if (RegionNotEmpty(&underReg)) {
@@ -1137,7 +1133,7 @@ miOverlayResizeWindow(WindowPtr pWin,
UnmapWindow(pChild, TRUE);
}
}
- (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin);
oldWinClip = oldWinClip2 = NULL;
if (pWin->bitGravity != ForgetGravity) {
@@ -1203,7 +1199,7 @@ miOverlayResizeWindow(WindowPtr pWin,
if (WasViewable) {
pRegion = RegionCreate(NullBox, 1);
- (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange);
pWin->valdata->before.resized = TRUE;
pWin->valdata->before.borderVisible = borderVisible;
@@ -1435,7 +1431,7 @@ miOverlaySetShape(WindowPtr pWin, int kind)
if (kind != ShapeInput) {
if (WasViewable) {
- (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin);
if (HasBorder(pWin)) {
RegionPtr borderVisible;
@@ -1463,7 +1459,7 @@ miOverlaySetShape(WindowPtr pWin, int kind)
ResizeChildrenWinSize(pWin, 0, 0, 0, 0);
if (WasViewable) {
- (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin);
(*pScreen->ValidateTree) (pWin->parent, NullWindow, VTOther);
(*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
@@ -1490,14 +1486,14 @@ miOverlayChangeBorderWidth(WindowPtr pWin, unsigned int width)
HadBorder = HasBorder(pWin);
pScreen = pWin->drawable.pScreen;
if (WasViewable && (width < oldwidth))
- (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin);
pWin->borderWidth = width;
SetBorderSize(pWin);
if (WasViewable) {
if (width > oldwidth) {
- (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
+ (*pScreen->MarkOverlappedWindows) (pWin, pWin);
if (HadBorder) {
RegionPtr borderVisible;
diff --git a/mi/miwindow.c b/mi/miwindow.c
index a1af3a7..a770a02 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -133,17 +133,13 @@ miMarkWindow(WindowPtr pWin)
}
Bool
-miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin)
+miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst)
{
BoxPtr box;
WindowPtr pChild, pLast;
Bool anyMarked = FALSE;
MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow;
- /* single layered systems are easy */
- if (ppLayerWin)
- *ppLayerWin = pWin;
-
if (pWin == pFirst) {
/* Blindly mark pWin and all of its inferiors. This is a slight
* overkill if there are mapped windows that outside pWin's border,
@@ -249,7 +245,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
Bool anyMarked = FALSE;
ScreenPtr pScreen;
WindowPtr windowToValidate;
- WindowPtr pLayerWin;
/* if this is a root window, can't be moved */
if (!(pParent = pWin->parent))
@@ -262,7 +257,7 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
if (WasViewable) {
oldRegion = RegionCreate(NullBox, 1);
RegionCopy(oldRegion, &pWin->borderClip);
- anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin);
+ anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin);
}
pWin->origin.x = x + (int) bw;
pWin->origin.y = y + (int) bw;
@@ -279,21 +274,16 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
ResizeChildrenWinSize(pWin, x - oldpt.x, y - oldpt.y, 0, 0);
if (WasViewable) {
- if (pLayerWin == pWin)
- anyMarked |= (*pScreen->MarkOverlappedWindows)
- (pWin, windowToValidate, NULL);
- else
- anyMarked |= (*pScreen->MarkOverlappedWindows)
- (pWin, pLayerWin, NULL);
+ anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, windowToValidate);
if (anyMarked) {
- (*pScreen->ValidateTree) (pLayerWin->parent, NullWindow, kind);
+ (*pScreen->ValidateTree) (pWin->parent, NullWindow, kind);
(*pWin->drawable.pScreen->CopyWindow) (pWin, oldpt, oldRegion);
RegionDestroy(oldRegion);
/* XXX need to retile border if ParentRelative origin */
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, NULL, kind);
+ (*pScreen->PostValidateTree) (pWin->parent, NULL, kind);
}
}
if (pWin->realized)
@@ -362,7 +352,6 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
RegionPtr borderVisible = NullRegion; /* visible area of the border */
Bool shrunk = FALSE; /* shrunk in an inner dimension */
Bool moved = FALSE; /* window position changed */
- WindowPtr pLayerWin;
/* if this is a root window, can't be resized */
if (!(pParent = pWin->parent))
@@ -396,7 +385,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
anyMarked = TRUE;
}
}
- anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin);
+ anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin);
oldWinClip = NULL;
if (pWin->bitGravity != ForgetGravity) {
@@ -449,12 +438,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
if (WasViewable) {
pRegion = RegionCreate(NullBox, 1);
- if (pLayerWin == pWin)
- anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange,
- NULL);
- else
- anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin,
- NULL);
+ anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange);
if (pWin->valdata) {
pWin->valdata->before.resized = TRUE;
@@ -462,7 +446,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
}
if (anyMarked)
- (*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, VTOther);
+ (*pScreen->ValidateTree) (pWin->parent, pFirstChange, VTOther);
/*
* the entire window is trashed unless bitGravity
* recovers portions of it
@@ -608,9 +592,9 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
if (destClip)
RegionDestroy(destClip);
if (anyMarked) {
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
+ (*pScreen->PostValidateTree) (pWin->parent, pFirstChange,
VTOther);
}
}
@@ -637,12 +621,10 @@ miSetShape(WindowPtr pWin, int kind)
Bool WasViewable = (Bool) (pWin->viewable);
ScreenPtr pScreen = pWin->drawable.pScreen;
Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
if (kind != ShapeInput) {
if (WasViewable) {
- anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin,
- &pLayerWin);
+ anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin);
if (pWin->valdata) {
if (HasBorder(pWin)) {
RegionPtr borderVisible;
@@ -662,15 +644,14 @@ miSetShape(WindowPtr pWin, int kind)
ResizeChildrenWinSize(pWin, 0, 0, 0, 0);
if (WasViewable) {
- anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
+ anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin);
if (anyMarked) {
- (*pScreen->ValidateTree) (pLayerWin->parent, NullWindow,
+ (*pScreen->ValidateTree) (pWin->parent, NullWindow,
VTOther);
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, NULL,
- VTOther);
+ (*pScreen->PostValidateTree) (pWin->parent, NULL, VTOther);
}
}
}
@@ -689,7 +670,6 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
ScreenPtr pScreen;
Bool WasViewable = (Bool) (pWin->viewable);
Bool HadBorder;
- WindowPtr pLayerWin;
oldwidth = wBorderWidth(pWin);
if (oldwidth == width)
@@ -697,15 +677,14 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
HadBorder = HasBorder(pWin);
pScreen = pWin->drawable.pScreen;
if (WasViewable && width < oldwidth)
- anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin);
+ anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin);
pWin->borderWidth = width;
SetBorderSize(pWin);
if (WasViewable) {
if (width > oldwidth) {
- anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin,
- &pLayerWin);
+ anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin);
/*
* save the old border visible region to correctly compute
* borderExposed.
@@ -721,11 +700,10 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
}
if (anyMarked) {
- (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther);
- (*pScreen->HandleExposures) (pLayerWin->parent);
+ (*pScreen->ValidateTree) (pWin->parent, pWin, VTOther);
+ (*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
- VTOther);
+ (*pScreen->PostValidateTree) (pWin->parent, pWin, VTOther);
}
}
if (pWin->realized)
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 6226ee8..5c86330 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -395,8 +395,7 @@ RootlessValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
* top-level windows.
*/
static Bool
-RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
- WindowPtr *ppLayerWin)
+RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst)
{
RegionRec saveRoot;
Bool result;
@@ -413,7 +412,7 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
}
else if (!IsTopLevel(pWin)) {
// not top-level window - mark normally
- result = pScreen->MarkOverlappedWindows(pWin, pFirst, ppLayerWin);
+ result = pScreen->MarkOverlappedWindows(pWin, pFirst);
}
else {
//top-level window - mark children ONLY - NO overlaps with sibs (?)
@@ -424,9 +423,6 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
MarkWindowProcPtr MarkWindow = pScreen->MarkWindow;
RL_DEBUG_MSG("is top level! ");
- /* single layered systems are easy */
- if (ppLayerWin)
- *ppLayerWin = pWin;
if (pWin == pFirst) {
/* Blindly mark pWin and all of its inferiors. This is a slight
--
1.9.3
More information about the xorg-devel
mailing list