Commit f12012b1 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Keystroke.c: avoid use of comparisons on "False"

parent 2b9d7d27
...@@ -559,41 +559,37 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) ...@@ -559,41 +559,37 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
*result = doCloseSession; *result = doCloseSession;
break; break;
case KEYSTROKE_SWITCH_ALL_SCREENS: case KEYSTROKE_SWITCH_ALL_SCREENS:
if (nxagentOption(Rootless) == False) { if (!nxagentOption(Rootless)) {
*result = doSwitchAllScreens; *result = doSwitchAllScreens;
} }
break; break;
case KEYSTROKE_MINIMIZE: case KEYSTROKE_MINIMIZE:
if (nxagentOption(Rootless) == False) { if (!nxagentOption(Rootless)) {
*result = doMinimize; *result = doMinimize;
} }
break; break;
case KEYSTROKE_LEFT: case KEYSTROKE_LEFT:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportLeft; *result = doViewportLeft;
} }
break; break;
case KEYSTROKE_UP: case KEYSTROKE_UP:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportUp; *result = doViewportUp;
} }
break; break;
case KEYSTROKE_RIGHT: case KEYSTROKE_RIGHT:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportRight; *result = doViewportRight;
} }
break; break;
case KEYSTROKE_DOWN: case KEYSTROKE_DOWN:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportDown; *result = doViewportDown;
} }
break; break;
case KEYSTROKE_RESIZE: case KEYSTROKE_RESIZE:
if (nxagentOption(Rootless) == False) { if (!nxagentOption(Rootless)) {
*result = doSwitchResizeMode; *result = doSwitchResizeMode;
} }
break; break;
...@@ -618,7 +614,7 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) ...@@ -618,7 +614,7 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
* Used to test the input devices state. * Used to test the input devices state.
*/ */
if (X -> type == KeyPress) { if (X -> type == KeyPress) {
if (nxagentDebugInputDevices == False) { if (!nxagentDebugInputDevices) {
fprintf(stderr, "Info: Turning input devices debug ON.\n"); fprintf(stderr, "Info: Turning input devices debug ON.\n");
nxagentDebugInputDevices = True; nxagentDebugInputDevices = True;
} else { } else {
...@@ -637,31 +633,27 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) ...@@ -637,31 +633,27 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
break; break;
#endif #endif
case KEYSTROKE_FULLSCREEN: case KEYSTROKE_FULLSCREEN:
if (nxagentOption(Rootless) == False) { if (!nxagentOption(Rootless)) {
*result = doSwitchFullscreen; *result = doSwitchFullscreen;
} }
break; break;
case KEYSTROKE_VIEWPORT_MOVE_LEFT: case KEYSTROKE_VIEWPORT_MOVE_LEFT:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportMoveLeft; *result = doViewportMoveLeft;
} }
break; break;
case KEYSTROKE_VIEWPORT_MOVE_UP: case KEYSTROKE_VIEWPORT_MOVE_UP:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportMoveUp; *result = doViewportMoveUp;
} }
break; break;
case KEYSTROKE_VIEWPORT_MOVE_RIGHT: case KEYSTROKE_VIEWPORT_MOVE_RIGHT:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportMoveRight; *result = doViewportMoveRight;
} }
break; break;
case KEYSTROKE_VIEWPORT_MOVE_DOWN: case KEYSTROKE_VIEWPORT_MOVE_DOWN:
if (nxagentOption(Rootless) == False && if (!nxagentOption(Rootless) && !nxagentOption(DesktopResize)) {
nxagentOption(DesktopResize) == False) {
*result = doViewportMoveDown; *result = doViewportMoveDown;
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment