Commit 9f5ddede authored by Ulrich Sibiller's avatar Ulrich Sibiller

Window.c: Drop defines CWParent and CWStackingOrder

They were just aliases to already existing defines and were not used stringently. So we had mix of aliased and non-aliased uses which is confusing when trying to understand the code...
parent a3e0376f
...@@ -727,7 +727,7 @@ Bool nxagentPositionWindow(WindowPtr pWin, int x, int y) ...@@ -727,7 +727,7 @@ Bool nxagentPositionWindow(WindowPtr pWin, int x, int y)
(void *) pWin, nxagentWindow(pWin), x, y); (void *) pWin, nxagentWindow(pWin), x, y);
#endif #endif
nxagentAddConfiguredWindow(pWin, CWParent | CWX | CWY | CWWidth | nxagentAddConfiguredWindow(pWin, CWSibling | CWX | CWY | CWWidth |
CWHeight | CWBorderWidth); CWHeight | CWBorderWidth);
return True; return True;
...@@ -1284,7 +1284,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1284,7 +1284,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
{ {
if (mask & CW_RootlessRestack) if (mask & CW_RootlessRestack)
{ {
mask = CWStackingOrder; mask = CWStackMode;
} }
} }
...@@ -1299,7 +1299,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1299,7 +1299,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
if (mask & CW_Update) if (mask & CW_Update)
{ {
mask |= CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackingOrder; mask |= CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackMode;
} }
if (mask & CWX) if (mask & CWX)
...@@ -1378,7 +1378,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1378,7 +1378,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
MAKE_SYNC_CONFIGURE_WINDOW; MAKE_SYNC_CONFIGURE_WINDOW;
} }
if (mask & CWStackingOrder && if (mask & CWStackMode &&
nxagentWindowPriv(pWin)->siblingAbove != nxagentWindowSiblingAbove(pWin)) nxagentWindowPriv(pWin)->siblingAbove != nxagentWindowSiblingAbove(pWin))
{ {
WindowPtr pSib; WindowPtr pSib;
...@@ -1478,7 +1478,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1478,7 +1478,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
* really needed? * really needed?
* *
* *
* else if (mask & CWStackingOrder) * else if (mask & CWStackMode)
* { * {
* if (nxagentSplashWindow) * if (nxagentSplashWindow)
* { * {
...@@ -1920,12 +1920,12 @@ Bool nxagentRealizeWindow(WindowPtr pWin) ...@@ -1920,12 +1920,12 @@ Bool nxagentRealizeWindow(WindowPtr pWin)
/* /*
* Not needed. * Not needed.
* *
* nxagentConfigureWindow(pWin, CWStackingOrder); * nxagentConfigureWindow(pWin, CWStackMode);
* *
* nxagentFlushConfigureWindow(); * nxagentFlushConfigureWindow();
*/ */
nxagentAddConfiguredWindow(pWin, CWStackingOrder); nxagentAddConfiguredWindow(pWin, CWStackMode);
nxagentAddConfiguredWindow(pWin, CW_Shape); nxagentAddConfiguredWindow(pWin, CW_Shape);
/* add by dimbor */ /* add by dimbor */
...@@ -2116,10 +2116,10 @@ void nxagentCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion) ...@@ -2116,10 +2116,10 @@ void nxagentCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion)
void nxagentClipNotify(WindowPtr pWin, int dx, int dy) void nxagentClipNotify(WindowPtr pWin, int dx, int dy)
{ {
/* /*
* nxagentConfigureWindow(pWin, CWStackingOrder); * nxagentConfigureWindow(pWin, CWStackMode);
*/ */
nxagentAddConfiguredWindow(pWin, CWStackingOrder); nxagentAddConfiguredWindow(pWin, CWStackMode);
nxagentAddConfiguredWindow(pWin, CW_Shape); nxagentAddConfiguredWindow(pWin, CW_Shape);
#ifndef NXAGENT_SHAPE #ifndef NXAGENT_SHAPE
...@@ -3572,10 +3572,10 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask) ...@@ -3572,10 +3572,10 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask)
{ {
unsigned int mask; unsigned int mask;
mask = valuemask & (CWParent | CWX | CWY | CWWidth | CWHeight | mask = valuemask & (CWSibling | CWX | CWY | CWWidth | CWHeight |
CWBorderWidth | CWStackingOrder | CW_Map | CW_Update | CW_Shape); CWBorderWidth | CWStackMode | CW_Map | CW_Update | CW_Shape);
valuemask &= ~(CWParent | CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackingOrder); valuemask &= ~(CWSibling | CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackMode);
if (mask & CWX && if (mask & CWX &&
nxagentWindowPriv(pWin)->x != nxagentWindowPriv(pWin)->x !=
...@@ -3612,11 +3612,11 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask) ...@@ -3612,11 +3612,11 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask)
valuemask |= CWBorderWidth; valuemask |= CWBorderWidth;
} }
if (mask & CWStackingOrder && if (mask & CWStackMode &&
nxagentWindowPriv(pWin)->siblingAbove != nxagentWindowPriv(pWin)->siblingAbove !=
nxagentWindowSiblingAbove(pWin)) nxagentWindowSiblingAbove(pWin))
{ {
valuemask |= CWStackingOrder; valuemask |= CWStackMode;
} }
{ {
......
...@@ -159,9 +159,6 @@ extern int nxagentWindowPrivateIndex; ...@@ -159,9 +159,6 @@ extern int nxagentWindowPrivateIndex;
#define nxagentDefaultWindowIsVisible() \ #define nxagentDefaultWindowIsVisible() \
(nxagentVisibility != VisibilityFullyObscured) (nxagentVisibility != VisibilityFullyObscured)
#define CWParent CWSibling
#define CWStackingOrder CWStackMode
#define CW_Map (1 << 15) #define CW_Map (1 << 15)
#define CW_Update (1 << 16) #define CW_Update (1 << 16)
#define CW_Shape (1 << 17) #define CW_Shape (1 << 17)
......
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