aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Window.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 2dea31af0..fcff4c6d0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -378,7 +378,7 @@ Bool nxagentCreateWindow(WindowPtr pWin)
nxagentWindowPriv(pWin) -> corruptedTimestamp = 0;
nxagentWindowPriv(pWin) -> splitResource = NULL;
- if (nxagentOption(Rootless) == 1)
+ if (nxagentOption(Rootless))
{
nxagentWindowPriv(pWin) -> isMapped = 0;
@@ -548,7 +548,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
{
nxagentPrivWindowPtr pWindowPriv;
- if (nxagentScreenTrap == 1)
+ if (nxagentScreenTrap)
{
return 1;
}
@@ -643,7 +643,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
}
if (nxagentOption(Rootless) && nxagentRootlessDialogPid == 0 &&
- nxagentLastWindowDestroyed == False && nxagentSomeWindowsAreMapped() == False)
+ !nxagentLastWindowDestroyed && nxagentSomeWindowsAreMapped() == False)
{
#ifdef TEST
fprintf(stderr, "nxagentDestroyWindow: Last mapped window as been destroyed.\n");
@@ -672,7 +672,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
*/
Bool nxagentPositionWindow(WindowPtr pWin, int x, int y)
{
- if (nxagentScreenTrap == 1)
+ if (nxagentScreenTrap)
{
return True;
}
@@ -690,7 +690,7 @@ Bool nxagentPositionWindow(WindowPtr pWin, int x, int y)
void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib)
{
- if (nxagentScreenTrap == 1)
+ if (nxagentScreenTrap)
{
return;
}
@@ -700,7 +700,7 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib)
void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
{
- if (nxagentOption(Rootless) == 1)
+ if (nxagentOption(Rootless))
{
return;
}
@@ -901,9 +901,9 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
XCheckTypedWindowEvent(nxagentDisplay, w, LeaveNotify, &e);
nxagentFullscreenWindow = w;
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(DesktopResize))
{
- if (nxagentOption(Shadow) == 0)
+ if (!nxagentOption(Shadow))
{
nxagentChangeScreenConfig(0, WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)),
HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay)), True);
@@ -952,12 +952,12 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentIconWindow = nxagentFullscreenWindow = None;
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(DesktopResize))
{
nxagentChangeOption(RootWidth, nxagentOption(SavedRootWidth));
nxagentChangeOption(RootHeight, nxagentOption(SavedRootHeight));
- if (nxagentOption(Shadow) == 0)
+ if (!nxagentOption(Shadow))
{
nxagentChangeScreenConfig(0, nxagentOption(RootWidth),
nxagentOption(RootHeight), True);
@@ -998,7 +998,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentChangeOption(Width, nxagentOption(SavedWidth));
nxagentChangeOption(Height, nxagentOption(SavedHeight));
- if (nxagentOption(Shadow) == 1 && nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(Shadow) && nxagentOption(DesktopResize))
{
nxagentShadowAdaptToRatio();
}
@@ -1250,7 +1250,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
int offX = nxagentWindowPriv(pWin)->x - pWin->origin.x;
int offY = nxagentWindowPriv(pWin)->y - pWin->origin.y;
- if (nxagentScreenTrap == 1)
+ if (nxagentScreenTrap)
{
#ifdef TEST
fprintf(stderr, "nxagentConfigureWindow: WARNING: Called with the screen trap set.\n");
@@ -1259,8 +1259,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
return;
}
- if (nxagentOption(Rootless) == 1 &&
- nxagentWindowTopLevel(pWin) == 1)
+ if (nxagentOption(Rootless) &&
+ nxagentWindowTopLevel(pWin))
{
mask &= ~(CWSibling | CWStackMode);
}
@@ -1877,7 +1877,7 @@ void nxagentSetWMState(WindowPtr pWin, CARD32 desired)
-+ */
Bool nxagentRealizeWindow(WindowPtr pWin)
{
- if (nxagentScreenTrap == 1)
+ if (nxagentScreenTrap)
{
return True;
}
@@ -2146,7 +2146,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
if (nxagentSessionState != SESSION_DOWN)
{
- if (nxagentExposeArrayIsInitialized == 0)
+ if (!nxagentExposeArrayIsInitialized)
{
#ifdef TEST
fprintf(stderr, "nxagentWindowExposures: Initializing expose queue.\n");
@@ -2171,7 +2171,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
nxagentInitRemoteExposeRegion();
- nxagentExposeArrayIsInitialized = 1;
+ nxagentExposeArrayIsInitialized = True;
}
RegionRec temp;
@@ -2195,7 +2195,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
RegionUnion(&temp, &temp, other_exposed);
}
- if (RegionNil(&temp) == 0)
+ if (!RegionNil(&temp))
{
RegionTranslate(&temp,
-(pWin -> drawable.x), -(pWin -> drawable.y));
@@ -2500,7 +2500,7 @@ void nxagentRefreshWindows(WindowPtr pWin)
void nxagentUnmapWindows(void)
{
- if (nxagentOption(Fullscreen) == 1)
+ if (nxagentOption(Fullscreen))
{
for (int i = 0; i < screenInfo.numScreens; i++)
{
@@ -2527,7 +2527,7 @@ void nxagentMapDefaultWindows(void)
*/
MapWindow(pWin, serverClient);
- if (nxagentOption(Rootless) == 0)
+ if (!nxagentOption(Rootless))
{
/*
* Show the NX splash screen.
@@ -2547,7 +2547,7 @@ void nxagentMapDefaultWindows(void)
* Windows client.
*/
- if (nxagentOption(Shadow) == 0 || !nxagentWMIsRunning)
+ if (!nxagentOption(Shadow) || !nxagentWMIsRunning)
{
#ifdef TEST
fprintf(stderr, "nxagentMapDefaultWindows: Mapping default window id [%ld].\n",
@@ -2556,7 +2556,7 @@ void nxagentMapDefaultWindows(void)
XMapWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum]);
- if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning)
+ if (nxagentOption(Fullscreen) && nxagentWMIsRunning)
{
nxagentMaximizeToFullScreen(pScreen);
}
@@ -2573,7 +2573,7 @@ void nxagentMapDefaultWindows(void)
* nxagentReconnectAllWindows, after the Root Window is mapped.
*/
- if (nxagentReconnectTrap == 0)
+ if (!nxagentReconnectTrap)
{
XRaiseWindow(nxagentDisplay, nxagentInputWindows[pScreen->myNum]);
}
@@ -2760,7 +2760,7 @@ Bool nxagentReconnectAllWindows(void *p0)
* raised.
*/
- if (nxagentOption(Rootless) == 0)
+ if (!nxagentOption(Rootless))
{
for (int i = 0; i < screenInfo.numScreens; i++)
{
@@ -3274,7 +3274,7 @@ XXX: This would break Motif menus.
XIconifyWindow(nxagentDisplay, nxagentWindow(pWin), pWin -> drawable.pScreen -> myNum);
}
}
- else if (nxagentOption(Rootless) == 0)
+ else if (!nxagentOption(Rootless))
{
/*
* Map the root window.