aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Extensions.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c6
6 files changed, 19 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 554f7ae38..6d63f768a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -1220,13 +1220,13 @@ static void nxagentParseSingleOption(char *name, char *value)
}
else if (!strcmp(name, "resize"))
{
- if (nxagentOption(DesktopResize) == 0 || strcmp(value, "0") == 0)
+ if (!nxagentOption(DesktopResize) || strcmp(value, "0") == 0)
{
- nxagentResizeDesktopAtStartup = 0;
+ nxagentResizeDesktopAtStartup = False;
}
else if (strcmp(value, "1") == 0)
{
- nxagentResizeDesktopAtStartup = 1;
+ nxagentResizeDesktopAtStartup = True;
}
else
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 471e3f6a1..f2f9c5119 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -569,7 +569,7 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
nxagentChangeOption(DesktopResize, !desktopResize);
- if (nxagentOption(DesktopResize) == 0)
+ if (!nxagentOption(DesktopResize))
{
fprintf(stderr,"Info: Disabled desktop resize mode in agent.\n");
@@ -607,7 +607,7 @@ void nxagentShadowSwitchResizeMode(ScreenPtr pScreen)
nxagentChangeOption(DesktopResize, !desktopResize);
- if (nxagentOption(DesktopResize) == 0)
+ if (!nxagentOption(DesktopResize))
{
nxagentShadowSetRatio(1.0, 1.0);
@@ -1229,7 +1229,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
}
}
- if (nxagentOption(DesktopResize) == False &&
+ if (!nxagentOption(DesktopResize) &&
(X.xbutton.state & (ControlMask | Mod1Mask)) == (ControlMask | Mod1Mask))
{
/*
@@ -3303,7 +3303,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
int newX = X -> xconfigure.x;
int newY = X -> xconfigure.y;
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(DesktopResize))
{
if (nxagentOption(Width) != X -> xconfigure.width ||
nxagentOption(Height) != X -> xconfigure.height ||
@@ -3369,7 +3369,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
nxagentChangeOption(Y, newY);
}
- if (nxagentOption(Shadow) == 1 && nxagentOption(DesktopResize) == 1 &&
+ if (nxagentOption(Shadow) == 1 && nxagentOption(DesktopResize) &&
(nxagentOption(Width) != X -> xconfigure.width ||
nxagentOption(Height) != X -> xconfigure.height))
{
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
index 835d05d19..77f2d6b38 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
@@ -429,7 +429,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
{
UpdateCurrentTime();
- if (nxagentOption(DesktopResize) == 1 &&
+ if (nxagentOption(DesktopResize) &&
(nxagentOption(Fullscreen) ||
width > WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) ||
height > HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay))))
@@ -437,11 +437,11 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
if (nxagentOption(ClientOs) != ClientOsWinnt
/*&& nxagentOption(ClientOs) != ClientNXPlayer*/)
{
- nxagentChangeOption(DesktopResize, 0);
+ nxagentChangeOption(DesktopResize, False);
}
}
- if (nxagentOption(DesktopResize) == 1 && !nxagentOption(Fullscreen) &&
+ if (nxagentOption(DesktopResize) && !nxagentOption(Fullscreen) &&
!nxagentOption(AllScreens))
{
nxagentChangeOption(Width, width);
@@ -450,7 +450,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
int result = nxagentResizeScreen(pScreen, width, height, mmWidth, mmHeight, True);
- if (result == 1 && nxagentOption(DesktopResize) == 1 &&
+ if (result == 1 && nxagentOption(DesktopResize) &&
!nxagentOption(Fullscreen) && !nxagentOption(AllScreens))
{
nxagentRandRSetWindowsSize(width, height);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c
index 660aa9a4d..d4a7479e3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c
@@ -108,7 +108,7 @@ void nxagentInitOptions(void)
nxagentOptions.ViewportXSpan = 0;
nxagentOptions.ViewportYSpan = 0;
- nxagentOptions.DesktopResize = 1;
+ nxagentOptions.DesktopResize = True;
nxagentOptions.Ratio = DONT_SCALE;
nxagentOptions.XRatio = DONT_SCALE;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index f5aa11e5f..d8f79f015 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -966,7 +966,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
if (nxagentOption(Fullscreen) &&
nxagentWMIsRunning &&
nxagentReconnectTrap &&
- nxagentResizeDesktopAtStartup == False &&
+ !nxagentResizeDesktopAtStartup &&
nxagentXServerGeometryChanged())
{
#ifdef TEST
@@ -1836,7 +1836,7 @@ N/A
sizeHints->width = nxagentOption(RootWidth);
sizeHints->height = nxagentOption(RootHeight);
- if (nxagentOption(DesktopResize) == 1 || nxagentOption(Fullscreen))
+ if (nxagentOption(DesktopResize) || nxagentOption(Fullscreen))
{
sizeHints->max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints->max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
@@ -4399,7 +4399,7 @@ void nxagentSetWMNormalHints(int screen, int width, int height)
sizeHints->width = width;
sizeHints->height = height;
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(DesktopResize))
{
sizeHints->max_width = WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
sizeHints->max_height = HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index ab61c101b..f1c21e12c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -901,7 +901,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
XCheckTypedWindowEvent(nxagentDisplay, w, LeaveNotify, &e);
nxagentFullscreenWindow = w;
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(DesktopResize))
{
if (nxagentOption(Shadow) == 0)
{
@@ -952,7 +952,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentIconWindow = nxagentFullscreenWindow = None;
- if (nxagentOption(DesktopResize) == 1)
+ if (nxagentOption(DesktopResize))
{
nxagentChangeOption(RootWidth, nxagentOption(SavedRootWidth));
nxagentChangeOption(RootHeight, nxagentOption(SavedRootHeight));
@@ -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) == 1 && nxagentOption(DesktopResize))
{
nxagentShadowAdaptToRatio();
}