Commit 7804c9c6 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Keystroke.c: simplify nxagentCheckSpecialKeystroke

parent dfa8bb27
...@@ -414,31 +414,15 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) ...@@ -414,31 +414,15 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
{ {
enum nxagentSpecialKeystroke stroke = find_keystroke(X); enum nxagentSpecialKeystroke stroke = find_keystroke(X);
*result = doNothing; *result = doNothing;
/* if (stroke == KEYSTROKE_NOTHING)
* 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);
return 0; return 0;
}
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentCheckSpecialKeystroke: got code %x - state %x - sym %lx\n", fprintf(stderr, "nxagentCheckSpecialKeystroke: got code %x - state %x - stroke %d\n",
X -> keycode, X -> state, sym[0]); X -> keycode, X -> state, stroke);
#endif #endif
free(sym);
/* /*
* Check special keys. * Check special keys.
......
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