diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-09-05 22:51:42 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2020-01-05 22:37:36 +0100 |
commit | ad89c7055cd79a1b6bfc9424f55362a7cd3d4409 (patch) | |
tree | 203f76402c2f45483bfa2a3fc51ec4160f8255a2 | |
parent | 36f679fb38765a2e3982b089d1f7cb080cbbe78c (diff) | |
download | nx-libs-ad89c7055cd79a1b6bfc9424f55362a7cd3d4409.tar.gz nx-libs-ad89c7055cd79a1b6bfc9424f55362a7cd3d4409.tar.bz2 nx-libs-ad89c7055cd79a1b6bfc9424f55362a7cd3d4409.zip |
Events.c: reformat switch blocks
save some lines
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 81 |
1 files changed, 17 insertions, 64 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index af6f17cc3..cdbe3c1c6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -300,26 +300,10 @@ char * nxagentGetNotifyMode(int mode) { switch (mode) { - case NotifyNormal: - { - return "NotifyNormal"; - break; - } - case NotifyGrab: - { - return "NotifyGrab"; - break; - } - case NotifyUngrab: - { - return "NotifyUngrab"; - break; - } - case NotifyWhileGrabbed: - { - return "NotifyWhileGrabbed"; - break; - } + case NotifyNormal: return "NotifyNormal"; + case NotifyGrab: return "NotifyGrab"; + case NotifyUngrab: return "NotifyUngrab"; + case NotifyWhileGrabbed: return "NotifyWhileGrabbed"; } return "Unknown"; } @@ -1013,67 +997,56 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) case doMinimize: { minimize = TRUE; - break; } case doSwitchFullscreen: { switchFullscreen = TRUE; - break; } case doSwitchAllScreens: { switchAllScreens = TRUE; - break; } case doViewportMoveUp: { nxagentMoveViewport(pScreen, 0, -nxagentOption(Height)); - break; } case doViewportMoveDown: { nxagentMoveViewport(pScreen, 0, nxagentOption(Height)); - break; } case doViewportMoveLeft: { nxagentMoveViewport(pScreen, -nxagentOption(Width), 0); - break; } case doViewportMoveRight: { nxagentMoveViewport(pScreen, nxagentOption(Width), 0); - break; } case doViewportUp: { nxagentMoveViewport(pScreen, 0, -nextinc(viewportInc)); - break; } case doViewportDown: { nxagentMoveViewport(pScreen, 0, +nextinc(viewportInc)); - break; } case doViewportLeft: { nxagentMoveViewport(pScreen, -nextinc(viewportInc), 0); - break; } case doViewportRight: { nxagentMoveViewport(pScreen, +nextinc(viewportInc), 0); - break; } case doSwitchResizeMode: @@ -1098,19 +1071,16 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) { nxagentSwitchDeferMode(); } - break; } case doAutoGrab: { nxagentToggleAutoGrab(); - break; } default: { FatalError("nxagentDispatchEvent: handleKeyPress returned unknown value\n"); - break; } } @@ -2942,18 +2912,10 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) switch (xfixesEvent -> xfixesselection.subtype) { - case SelectionSetOwner: - fprintf(stderr, "SelectionSetOwner.\n"); - break; - case SelectionWindowDestroy: - fprintf(stderr, "SelectionWindowDestroy.\n"); - break; - case SelectionClientClose: - fprintf(stderr, "SelectionClientClose.\n"); - break; - default: - fprintf(stderr, ".\n"); - break; + case SelectionSetOwner: fprintf(stderr, "SelectionSetOwner.\n"); break; + case SelectionWindowDestroy: fprintf(stderr, "SelectionWindowDestroy.\n"); break; + case SelectionClientClose: fprintf(stderr, "SelectionClientClose.\n"); break; + default: fprintf(stderr, ".\n"); break; } #endif @@ -4586,24 +4548,15 @@ static const char *nxagentGrabStateToString(int state) { switch (state) { - case 0: - return "NOT_GRABBED"; - case 1: - return "THAWED"; - case 2: - return "THAWED_BOTH"; - case 3: - return "FREEZE_NEXT_EVENT"; - case 4: - return "FREEZE_BOTH_NEXT_EVENT"; - case 5: - return "FROZEN_NO_EVENT"; - case 6: - return "FROZEN_WITH_EVENT"; - case 7: - return "THAW_OTHERS"; - default: - return "unknown state"; + case 0: return "NOT_GRABBED"; + case 1: return "THAWED"; + case 2: return "THAWED_BOTH"; + case 3: return "FREEZE_NEXT_EVENT"; + case 4: return "FREEZE_BOTH_NEXT_EVENT"; + case 5: return "FROZEN_NO_EVENT"; + case 6: return "FROZEN_WITH_EVENT"; + case 7: return "THAW_OTHERS"; + default: return "unknown state"; } } |