From 2b9d7d27494a8b795e67cb1ae5ae2ebff37e08a6 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 23 Mar 2017 22:54:34 +0100 Subject: Keystroke.c: use Booleans where appropriate Some of the keystroke checks have used them before. This commit unifies those checks. --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'nx-X11/programs/Xserver/hw') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 92d20cf65..5f4b70b43 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -48,7 +48,7 @@ extern Bool nxagentIpaq; extern char *nxagentKeystrokeFile; #ifdef NX_DEBUG_INPUT -int nxagentDebugInputDevices = 0; +int nxagentDebugInputDevices = False; unsigned long nxagentLastInputDevicesDumpTime = 0; extern void nxagentDeactivateInputDevicesGrabs(); #endif @@ -618,12 +618,12 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) * Used to test the input devices state. */ if (X -> type == KeyPress) { - if (nxagentDebugInputDevices == 0) { + if (nxagentDebugInputDevices == False) { fprintf(stderr, "Info: Turning input devices debug ON.\n"); - nxagentDebugInputDevices = 1; + nxagentDebugInputDevices = True; } else { fprintf(stderr, "Info: Turning input devices debug OFF.\n"); - nxagentDebugInputDevices = 0; + nxagentDebugInputDevices = False; nxagentLastInputDevicesDumpTime = 0; } } @@ -637,31 +637,31 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) break; #endif case KEYSTROKE_FULLSCREEN: - if (nxagentOption(Rootless) == 0) { + if (nxagentOption(Rootless) == False) { *result = doSwitchFullscreen; } break; case KEYSTROKE_VIEWPORT_MOVE_LEFT: - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) { + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { *result = doViewportMoveLeft; } break; case KEYSTROKE_VIEWPORT_MOVE_UP: - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) { + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { *result = doViewportMoveUp; } break; case KEYSTROKE_VIEWPORT_MOVE_RIGHT: - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) { + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { *result = doViewportMoveRight; } break; case KEYSTROKE_VIEWPORT_MOVE_DOWN: - if (nxagentOption(Rootless) == 0 && - nxagentOption(DesktopResize) == 0) { + if (nxagentOption(Rootless) == False && + nxagentOption(DesktopResize) == False) { *result = doViewportMoveDown; } break; -- cgit v1.2.3