Commit c8383b83 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Window.c: indent ifdefs for better readability

parent df531c16
...@@ -269,9 +269,9 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -269,9 +269,9 @@ Bool nxagentCreateWindow(WindowPtr pWin)
{ {
nxagentClearSplash(nxagentRootTileWindow); nxagentClearSplash(nxagentRootTileWindow);
} }
#ifdef NXAGENT_LOGO_DEBUG #ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount); fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount);
#endif #endif
if (pWin->drawable.class == InputOnly) if (pWin->drawable.class == InputOnly)
{ {
...@@ -495,17 +495,15 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -495,17 +495,15 @@ Bool nxagentCreateWindow(WindowPtr pWin)
nxagentWindowPriv(pWin->nextSib)->siblingAbove = nxagentWindow(pWin); nxagentWindowPriv(pWin->nextSib)->siblingAbove = nxagentWindow(pWin);
} }
#ifdef NXAGENT_SHAPE2 #ifdef SHAPE
#ifdef SHAPE #ifdef NXAGENT_SHAPE2
nxagentWindowPriv(pWin)->boundingShape = NULL; nxagentWindowPriv(pWin)->boundingShape = NULL;
nxagentWindowPriv(pWin)->clipShape = NULL; nxagentWindowPriv(pWin)->clipShape = NULL;
#endif /* SHAPE */ #else
#else nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1);
#ifdef SHAPE nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1);
nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); #endif
nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1); #endif /* SHAPE */
#endif /* SHAPE */
#endif
fbCreateWindow(pWin); fbCreateWindow(pWin);
...@@ -604,22 +602,22 @@ Bool nxagentDestroyWindow(WindowPtr pWin) ...@@ -604,22 +602,22 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
pWindowPriv->siblingAbove; pWindowPriv->siblingAbove;
} }
#ifdef NXAGENT_SHAPE2 #ifdef NXAGENT_SHAPE2
#ifdef SHAPE #ifdef SHAPE
if (pWindowPriv->boundingShape) if (pWindowPriv->boundingShape)
{ {
RegionDestroy(pWindowPriv->boundingShape); RegionDestroy(pWindowPriv->boundingShape);
} }
if (pWindowPriv->clipShape) if (pWindowPriv->clipShape)
{ {
RegionDestroy(pWindowPriv->clipShape);
}
#endif
#else
RegionDestroy(pWindowPriv->boundingShape);
RegionDestroy(pWindowPriv->clipShape); RegionDestroy(pWindowPriv->clipShape);
}
#endif #endif
#else
RegionDestroy(pWindowPriv->boundingShape);
RegionDestroy(pWindowPriv->clipShape);
#endif
if (pWindowPriv -> corruptedRegion) if (pWindowPriv -> corruptedRegion)
{ {
...@@ -2031,13 +2029,13 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy) ...@@ -2031,13 +2029,13 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy)
nxagentAddConfiguredWindow(pWin, CWStackingOrder); nxagentAddConfiguredWindow(pWin, CWStackingOrder);
nxagentAddConfiguredWindow(pWin, CW_Shape); nxagentAddConfiguredWindow(pWin, CW_Shape);
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
#ifdef SHAPE #ifdef SHAPE
/* /*
* nxagentShapeWindow(pWin); * nxagentShapeWindow(pWin);
*/ */
#endif /* SHAPE */ #endif /* SHAPE */
#endif /* NXAGENT_SHAPE */ #endif /* NXAGENT_SHAPE */
} }
void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
...@@ -2299,12 +2297,12 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2299,12 +2297,12 @@ void nxagentShapeWindow(WindowPtr pWin)
RegionNumRects(wBoundingShape(pWin))); RegionNumRects(wBoundingShape(pWin)));
#endif #endif
#ifdef NXAGENT_SHAPE2 #ifdef NXAGENT_SHAPE2
if (!nxagentWindowPriv(pWin)->boundingShape) if (!nxagentWindowPriv(pWin)->boundingShape)
{ {
nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1); nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1);
} }
#endif #endif
RegionCopy(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin)); RegionCopy(nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin));
...@@ -2321,10 +2319,10 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2321,10 +2319,10 @@ void nxagentShapeWindow(WindowPtr pWin)
XUnionRectWithRegion(&rect, reg, reg); XUnionRectWithRegion(&rect, reg, reg);
} }
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin), XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin),
ShapeBounding, 0, 0, reg, ShapeSet); ShapeBounding, 0, 0, reg, ShapeSet);
#endif #endif
XDestroyRegion(reg); XDestroyRegion(reg);
} }
...@@ -2336,11 +2334,10 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2336,11 +2334,10 @@ void nxagentShapeWindow(WindowPtr pWin)
RegionEmpty(nxagentWindowPriv(pWin)->boundingShape); RegionEmpty(nxagentWindowPriv(pWin)->boundingShape);
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin),
ShapeBounding, 0, 0, None, ShapeSet); ShapeBounding, 0, 0, None, ShapeSet);
#endif #endif
} }
} }
...@@ -2357,12 +2354,12 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2357,12 +2354,12 @@ void nxagentShapeWindow(WindowPtr pWin)
RegionNumRects(wClipShape(pWin))); RegionNumRects(wClipShape(pWin)));
#endif #endif
#ifdef NXAGENT_SHAPE2 #ifdef NXAGENT_SHAPE2
if (!nxagentWindowPriv(pWin)->clipShape) if (!nxagentWindowPriv(pWin)->clipShape)
{ {
nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1); nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1);
} }
#endif #endif
RegionCopy(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin)); RegionCopy(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin));
...@@ -2379,10 +2376,10 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2379,10 +2376,10 @@ void nxagentShapeWindow(WindowPtr pWin)
XUnionRectWithRegion(&rect, reg, reg); XUnionRectWithRegion(&rect, reg, reg);
} }
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin), XShapeCombineRegion(nxagentDisplay, nxagentWindow(pWin),
ShapeClip, 0, 0, reg, ShapeSet); ShapeClip, 0, 0, reg, ShapeSet);
#endif #endif
XDestroyRegion(reg); XDestroyRegion(reg);
} }
...@@ -2394,10 +2391,10 @@ void nxagentShapeWindow(WindowPtr pWin) ...@@ -2394,10 +2391,10 @@ void nxagentShapeWindow(WindowPtr pWin)
RegionEmpty(nxagentWindowPriv(pWin)->clipShape); RegionEmpty(nxagentWindowPriv(pWin)->clipShape);
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin), XShapeCombineMask(nxagentDisplay, nxagentWindow(pWin),
ShapeClip, 0, 0, None, ShapeSet); ShapeClip, 0, 0, None, ShapeSet);
#endif #endif
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment