diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-07-04 07:47:19 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-09-29 17:10:05 +0200 |
commit | 39866f5c133230e5731156c2356c8571c971534c (patch) | |
tree | 2ff45adeccac921f43f991fc6648478198882db1 | |
parent | 1920599e1829ae0469ea5a1ce04e1e251f564847 (diff) | |
download | nx-libs-39866f5c133230e5731156c2356c8571c971534c.tar.gz nx-libs-39866f5c133230e5731156c2356c8571c971534c.tar.bz2 nx-libs-39866f5c133230e5731156c2356c8571c971534c.zip |
Events.c: scope improvements
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 111212601..655fcbb95 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -378,13 +378,11 @@ void nxagentRemoteWindowID(Window window, Bool newline) } else if (tp.nitems > 0) { - int count = 0; - int ret; - char **list = NULL; - fprintf(stderr, " \""); - ret = XmbTextPropertyToTextList(nxagentDisplay, &tp, &list, &count); + int count = 0; + char **list = NULL; + int ret = XmbTextPropertyToTextList(nxagentDisplay, &tp, &list, &count); if ((ret == Success || ret > 0) && list != NULL) { @@ -1643,9 +1641,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was { for (int k = 0; k < 8; k++) { - const int mask = 1; - - if (val & (mask << k)) { #ifdef NXAGENT_FIXKEYS_DEBUG fprintf(stderr, "sending KeyRelease event for keycode: %x\n", @@ -4679,7 +4674,6 @@ static const char *nxagentGrabStateToString(int state) void nxagentDumpInputDevicesState(void) { - int mask = 1; DeviceIntPtr dev; GrabPtr grab; WindowPtr pWin = NULL; @@ -4697,7 +4691,7 @@ void nxagentDumpInputDevicesState(void) { for (int k = 0; k < 8; k++) { - if (val & (mask << k)) + if (val & (1 << k)) { fprintf(stderr, "\n\t[%d] [%s]", i * 8 + k, XKeysymToString(XKeycodeToKeysym(nxagentDisplay, i * 8 + k, 0))); @@ -4758,7 +4752,7 @@ void nxagentDumpInputDevicesState(void) { for (int k = 0; k < 8; k++) { - if (val & (mask << k)) + if (val & (1 << k)) { fprintf(stderr, "\n\t[%d]", i * 8 + k); } |