diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-03-10 22:55:37 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-03-13 21:23:17 +0100 |
commit | 7804c9c697b6aab9a984deb370eda69884eecd64 (patch) | |
tree | 01a159ff884e194110ee12f7ad8e48c621d89221 /nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | |
parent | dfa8bb27bbab2709f0d29fa825a3ebe5e83bcfdb (diff) | |
download | nx-libs-7804c9c697b6aab9a984deb370eda69884eecd64.tar.gz nx-libs-7804c9c697b6aab9a984deb370eda69884eecd64.tar.bz2 nx-libs-7804c9c697b6aab9a984deb370eda69884eecd64.zip |
Keystroke.c: simplify nxagentCheckSpecialKeystroke
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 93bb48cba..7148cadf0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -414,31 +414,15 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) { enum nxagentSpecialKeystroke stroke = find_keystroke(X); - *result = doNothing; - /* - * I don't know how much hard work is doing this operation. - * Do we need a cache ? - */ - - int keysyms_per_keycode_return; - XlibKeySym *sym = XGetKeyboardMapping(nxagentDisplay, - X->keycode, - 1, - &keysyms_per_keycode_return); - - if (sym[0] == XK_VoidSymbol || sym[0] == NoSymbol) - { - free(sym); + if (stroke == KEYSTROKE_NOTHING) return 0; - } #ifdef TEST - fprintf(stderr, "nxagentCheckSpecialKeystroke: got code %x - state %x - sym %lx\n", - X -> keycode, X -> state, sym[0]); + fprintf(stderr, "nxagentCheckSpecialKeystroke: got code %x - state %x - stroke %d\n", + X -> keycode, X -> state, stroke); #endif - free(sym); /* * Check special keys. |