diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-03-10 23:08:40 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-03-13 21:24:52 +0100 |
commit | ac3794c5fb0e8e4e1c48e19c2672b9b6135936ad (patch) | |
tree | e4b4f582e1b3eb3fb83922f0622e62e8bf53350c /nx-X11/programs | |
parent | 06c83be7e3b65a43ce78776f205d3589cb18852b (diff) | |
download | nx-libs-ac3794c5fb0e8e4e1c48e19c2672b9b6135936ad.tar.gz nx-libs-ac3794c5fb0e8e4e1c48e19c2672b9b6135936ad.tar.bz2 nx-libs-ac3794c5fb0e8e4e1c48e19c2672b9b6135936ad.zip |
Keystroke.c: reorder parse_keystroke_file
for better readability
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 28d6d2467..ae3ba7808 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -387,21 +387,19 @@ static void parse_keystroke_file(void) static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) { + enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING; int keysyms_per_keycode_return; - XlibKeySym *keysym = XGetKeyboardMapping(nxagentDisplay, - X->keycode, - 1, - &keysyms_per_keycode_return); - struct nxagentSpecialKeystrokeMap *cur = map; parse_keystroke_file(); - enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING; + XlibKeySym *keysym = XGetKeyboardMapping(nxagentDisplay, + X->keycode, + 1, + &keysyms_per_keycode_return); while (cur->stroke != KEYSTROKE_END_MARKER) { if (cur->keysym == keysym[0] && modifier_matches(cur->modifierMask, cur->modifierAltMeta, X->state)) { - free(keysym); return cur->stroke; } |