diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-03-10 23:09:24 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-03-13 21:24:52 +0100 |
commit | c80605a19c0c92d9a0e91bfcc84657527dd8d5ac (patch) | |
tree | a4bb56f37517ba085b862674213d44a75313c56b /nx-X11 | |
parent | ac3794c5fb0e8e4e1c48e19c2672b9b6135936ad (diff) | |
download | nx-libs-c80605a19c0c92d9a0e91bfcc84657527dd8d5ac.tar.gz nx-libs-c80605a19c0c92d9a0e91bfcc84657527dd8d5ac.tar.bz2 nx-libs-c80605a19c0c92d9a0e91bfcc84657527dd8d5ac.zip |
Keystroke.c: Boolify nxagentCheckSpecialKeystroke
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 14 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index ae3ba7808..8bf9779a5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -410,13 +410,13 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) return ret; } -int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) +Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) { enum nxagentSpecialKeystroke stroke = find_keystroke(X); *result = doNothing; if (stroke == KEYSTROKE_NOTHING) - return 0; + return False; #ifdef TEST fprintf(stderr, "nxagentCheckSpecialKeystroke: got code %x - state %x - stroke %d\n", @@ -436,7 +436,7 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) { *result = doStartKbd; - return 1; + return True; } switch (stroke) { @@ -492,7 +492,7 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) break; case KEYSTROKE_IGNORE: /* this is used e.g. to ignore C-A-Backspace aka XK_Terminate_Server */ - return 1; + return True; break; case KEYSTROKE_FORCE_SYNCHRONIZATION: nxagentForceSynchronization = 1; @@ -517,7 +517,7 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) nxagentLastInputDevicesDumpTime = 0; } } - return 1; + return True; #endif break; case KEYSTROKE_DEACTIVATE_INPUT_DEVICES_GRAB: @@ -525,7 +525,7 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) if (X->type == KeyPress) { nxagentDeactivateInputDevicesGrab(); } - return 1; + return True; #endif break; case KEYSTROKE_FULLSCREEN: @@ -562,5 +562,5 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) case KEYSTROKE_MAX: break; } - return (*result == doNothing) ? 0 : 1; + return (*result == doNothing); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index 45791f9ba..28374e807 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -28,7 +28,7 @@ #include "Events.h" -extern int nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*); +extern Bool nxagentCheckSpecialKeystroke(XKeyEvent*, enum HandleEventResult*); unsigned int nxagentAltMetaMask; |