aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-03-23 22:54:34 +0100
committerUlrich Sibiller <uli42@gmx.de>2017-04-03 21:28:11 +0200
commit2b9d7d27494a8b795e67cb1ae5ae2ebff37e08a6 (patch)
treef8a7eef40f33b0d13f9465f60e9326033569812c
parent076d458e739cb1e1b89dc5d3022a8b5d3ad35338 (diff)
downloadnx-libs-2b9d7d27494a8b795e67cb1ae5ae2ebff37e08a6.tar.gz
nx-libs-2b9d7d27494a8b795e67cb1ae5ae2ebff37e08a6.tar.bz2
nx-libs-2b9d7d27494a8b795e67cb1ae5ae2ebff37e08a6.zip
Keystroke.c: use Booleans where appropriate
Some of the keystroke checks have used them before. This commit unifies those checks.
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.c26
1 files changed, 13 insertions, 13 deletions
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;