misc: Fold together some redundant conditionals
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
38
dix/window.c
38
dix/window.c
@@ -2059,10 +2059,10 @@ ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind)
|
|||||||
if (anyMarked) {
|
if (anyMarked) {
|
||||||
(*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, kind);
|
(*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, kind);
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
|
if (pWin->drawable.pScreen->PostValidateTree)
|
||||||
|
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
||||||
|
kind);
|
||||||
}
|
}
|
||||||
if (anyMarked && pWin->drawable.pScreen->PostValidateTree)
|
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
|
||||||
kind);
|
|
||||||
}
|
}
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
@@ -2576,10 +2576,10 @@ MapWindow(WindowPtr pWin, ClientPtr client)
|
|||||||
if (anyMarked) {
|
if (anyMarked) {
|
||||||
(*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTMap);
|
(*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTMap);
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
|
if (pScreen->PostValidateTree)
|
||||||
|
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
||||||
|
VTMap);
|
||||||
}
|
}
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
|
||||||
VTMap);
|
|
||||||
}
|
}
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
}
|
}
|
||||||
@@ -2657,10 +2657,10 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
|
|||||||
if (anyMarked) {
|
if (anyMarked) {
|
||||||
(*pScreen->ValidateTree) (pLayerWin->parent, pFirstMapped, VTMap);
|
(*pScreen->ValidateTree) (pLayerWin->parent, pFirstMapped, VTMap);
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
|
if (pScreen->PostValidateTree)
|
||||||
|
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstMapped,
|
||||||
|
VTMap);
|
||||||
}
|
}
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstMapped,
|
|
||||||
VTMap);
|
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2754,9 +2754,9 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
|
|||||||
if (!fromConfigure) {
|
if (!fromConfigure) {
|
||||||
(*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
|
(*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
|
if (pScreen->PostValidateTree)
|
||||||
|
(*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
|
||||||
}
|
}
|
||||||
if (!fromConfigure && pScreen->PostValidateTree)
|
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
|
|
||||||
}
|
}
|
||||||
if (wasRealized && !fromConfigure) {
|
if (wasRealized && !fromConfigure) {
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
@@ -2824,9 +2824,10 @@ UnmapSubwindows(WindowPtr pWin)
|
|||||||
}
|
}
|
||||||
(*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap);
|
(*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap);
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
|
if (pScreen->PostValidateTree)
|
||||||
|
(*pScreen->PostValidateTree) (pLayerWin->parent, pHead,
|
||||||
|
VTUnmap);
|
||||||
}
|
}
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pHead, VTUnmap);
|
|
||||||
}
|
}
|
||||||
if (wasRealized) {
|
if (wasRealized) {
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
@@ -3592,15 +3593,12 @@ SetRootClip(ScreenPtr pScreen, Bool enable)
|
|||||||
anyMarked = TRUE;
|
anyMarked = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anyMarked)
|
if (anyMarked) {
|
||||||
(*pScreen->ValidateTree) (pWin, NullWindow, VTOther);
|
(*pScreen->ValidateTree) (pWin, NullWindow, VTOther);
|
||||||
}
|
|
||||||
|
|
||||||
if (WasViewable) {
|
|
||||||
if (anyMarked)
|
|
||||||
(*pScreen->HandleExposures) (pWin);
|
(*pScreen->HandleExposures) (pWin);
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
if (pScreen->PostValidateTree)
|
||||||
(*pScreen->PostValidateTree) (pWin, NullWindow, VTOther);
|
(*pScreen->PostValidateTree) (pWin, NullWindow, VTOther);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
|
|||||||
@@ -1464,11 +1464,7 @@ miOverlaySetShape(WindowPtr pWin, int kind)
|
|||||||
|
|
||||||
if (WasViewable) {
|
if (WasViewable) {
|
||||||
(*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
|
(*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
|
||||||
|
|
||||||
(*pScreen->ValidateTree) (pWin->parent, NullWindow, VTOther);
|
(*pScreen->ValidateTree) (pWin->parent, NullWindow, VTOther);
|
||||||
}
|
|
||||||
|
|
||||||
if (WasViewable) {
|
|
||||||
(*pScreen->HandleExposures) (pWin->parent);
|
(*pScreen->HandleExposures) (pWin->parent);
|
||||||
if (pScreen->PostValidateTree)
|
if (pScreen->PostValidateTree)
|
||||||
(*pScreen->PostValidateTree) (pWin->parent, NullWindow,
|
(*pScreen->PostValidateTree) (pWin->parent, NullWindow,
|
||||||
|
|||||||
@@ -292,9 +292,9 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
|
|||||||
RegionDestroy(oldRegion);
|
RegionDestroy(oldRegion);
|
||||||
/* XXX need to retile border if ParentRelative origin */
|
/* XXX need to retile border if ParentRelative origin */
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
|
if (pScreen->PostValidateTree)
|
||||||
|
(*pScreen->PostValidateTree) (pLayerWin->parent, NULL, kind);
|
||||||
}
|
}
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, NullWindow, kind);
|
|
||||||
}
|
}
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
@@ -607,11 +607,12 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
|
|||||||
RegionDestroy(pRegion);
|
RegionDestroy(pRegion);
|
||||||
if (destClip)
|
if (destClip)
|
||||||
RegionDestroy(destClip);
|
RegionDestroy(destClip);
|
||||||
if (anyMarked)
|
if (anyMarked) {
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
if (pScreen->PostValidateTree)
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
||||||
VTOther);
|
VTOther);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
@@ -663,17 +664,14 @@ miSetShape(WindowPtr pWin, int kind)
|
|||||||
if (WasViewable) {
|
if (WasViewable) {
|
||||||
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
|
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
|
||||||
|
|
||||||
if (anyMarked)
|
if (anyMarked) {
|
||||||
(*pScreen->ValidateTree) (pLayerWin->parent, NullWindow,
|
(*pScreen->ValidateTree) (pLayerWin->parent, NullWindow,
|
||||||
VTOther);
|
VTOther);
|
||||||
}
|
|
||||||
|
|
||||||
if (WasViewable) {
|
|
||||||
if (anyMarked)
|
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
if (pScreen->PostValidateTree)
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, NullWindow,
|
(*pScreen->PostValidateTree) (pLayerWin->parent, NULL,
|
||||||
VTOther);
|
VTOther);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
@@ -725,10 +723,10 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
|
|||||||
if (anyMarked) {
|
if (anyMarked) {
|
||||||
(*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther);
|
(*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther);
|
||||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||||
|
if (pScreen->PostValidateTree)
|
||||||
|
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
||||||
|
VTOther);
|
||||||
}
|
}
|
||||||
if (anyMarked && pScreen->PostValidateTree)
|
|
||||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
|
||||||
VTOther);
|
|
||||||
}
|
}
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowsRestructured();
|
WindowsRestructured();
|
||||||
|
|||||||
Reference in New Issue
Block a user