aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-09-24 21:03:15 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-10-22 14:34:28 +0200
commit6b2033bd2c1ae12b91127d26d3f99d8299f6495e (patch)
tree2ca18a015ce179ac9e11968614653dab276e5db9
parentc478ba2937b6a7e6c55b615ddeac3ca525f6a743 (diff)
downloadnx-libs-6b2033bd2c1ae12b91127d26d3f99d8299f6495e.tar.gz
nx-libs-6b2033bd2c1ae12b91127d26d3f99d8299f6495e.tar.bz2
nx-libs-6b2033bd2c1ae12b91127d26d3f99d8299f6495e.zip
nxagent: use nxagentWMIsRunning as Bool all over the place
has been used as integer sometimes (technically correct, but not nice) Fixes ArcticaProject/nx-libs#698
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Atoms.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c6
5 files changed, 13 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
index 1e9a4bd37..c36c38e2f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
@@ -106,7 +106,7 @@ static void catchAndRedirect(Display* dpy, XErrorEvent* X)
X -> request_code == X_ChangeWindowAttributes &&
X -> resourceid == DefaultRootWindow(dpy))
{
- nxagentWMIsRunning = TRUE;
+ nxagentWMIsRunning = True;
}
else
{
@@ -122,7 +122,7 @@ static void startWMDetection(void)
* window.
*/
- nxagentWMIsRunning = FALSE;
+ nxagentWMIsRunning = False;
previousErrorHandler = XSetErrorHandler((XErrorHandler)&catchAndRedirect);
@@ -166,7 +166,7 @@ static void finishWMDetection(Bool verbose)
void nxagentWMDetect()
{
Bool verbose = False;
- int windowManagerWasRunning = nxagentWMIsRunning;
+ Bool windowManagerWasRunning = nxagentWMIsRunning;
startWMDetection();
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 071e93b32..c0263cc81 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -2046,7 +2046,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
* event that would trigger xinerama updates. So we do that once
* the nxagent window gets mapped.
*/
- if (nxagentWMIsRunning == 0 &&
+ if (!nxagentWMIsRunning &&
X.xmap.window == nxagentDefaultWindows[nxagentScreen(X.xmap.window)->myNum])
{
nxagentChangeScreenConfig(nxagentScreen(X.xmap.window)->myNum, nxagentOption(Width),
@@ -2767,7 +2767,7 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
if (X -> xclient.window == (nxagentOption(Fullscreen) ?
nxagentIconWindow : nxagentDefaultWindows[0]) ||
- nxagentWMIsRunning == 0)
+ !nxagentWMIsRunning)
{
*result = doCloseSession;
}
@@ -3353,7 +3353,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
* by the window manager are relevant, see ICCCM Chapter 4,
* "Configuring the Window"
*/
- Bool updatePos = (nxagentWMIsRunning == 0 || X -> xconfigure.send_event != 0);
+ Bool updatePos = (!nxagentWMIsRunning || X -> xconfigure.send_event != 0);
int newX = X -> xconfigure.x;
int newY = X -> xconfigure.y;
@@ -3395,7 +3395,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
count++;
#endif
- if (nxagentWMIsRunning == 0 || X -> xconfigure.send_event)
+ if (!nxagentWMIsRunning || X -> xconfigure.send_event)
{
updatePos = True;
newX = X -> xconfigure.x;
@@ -3626,7 +3626,7 @@ int nxagentHandleReparentNotify(XEvent* X)
return 1;
}
- else if (nxagentWMIsRunning == 1 && nxagentOption(Fullscreen) == 0 &&
+ else if (nxagentWMIsRunning && nxagentOption(Fullscreen) == 0 &&
nxagentOption(WMBorderWidth) == -1)
{
XlibWindow w;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index 9a6cbf28b..6d15f2021 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -402,7 +402,7 @@ void nxagentDisconnectSession(void)
nxagentDisconnectAllGCs();
nxagentDisconnectDisplay();
- nxagentWMIsRunning = 0;
+ nxagentWMIsRunning = False;
#ifdef TEST
fprintf(stderr, "nxagentDisconnectSession: Disconnection completed. SigHup is [%d]. IoError is [%d].\n",
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index b5aabf8bd..8df5ec546 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -977,7 +977,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
* fullscreen mode.
*/
- if (nxagentOption(Rootless) == False && nxagentWMIsRunning == False)
+ if (nxagentOption(Rootless) == False && !nxagentWMIsRunning)
{
#ifdef TEST
fprintf(stderr, "nxagentOpenScreen: Forcing fullscreen mode with no window manager running.\n");
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 5373d4889..bde1c7d8a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -762,7 +762,7 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
isItTimeToYield = 1;
- if (nxagentWMIsRunning == 0)
+ if (!nxagentWMIsRunning)
{
#ifdef WARNING
fprintf(stderr, "Warning: Can't switch to window mode, no window manager "
@@ -2552,7 +2552,7 @@ void nxagentMapDefaultWindows(void)
* Windows client.
*/
- if (nxagentOption(Shadow) == 0 || nxagentWMIsRunning == 0)
+ if (nxagentOption(Shadow) == 0 || !nxagentWMIsRunning)
{
#ifdef TEST
fprintf(stderr, "nxagentMapDefaultWindows: Mapping default window id [%ld].\n",
@@ -2561,7 +2561,7 @@ void nxagentMapDefaultWindows(void)
XMapWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum]);
- if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning == 1)
+ if (nxagentOption(Fullscreen) == 1 && nxagentWMIsRunning)
{
nxagentMaximizeToFullScreen(pScreen);
}