From fb69d23fa01a3630e885bce177a1c8f6e8bbda03 Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Tue, 4 Jun 2013 10:16:57 +0200 Subject: Fix a deprecated warning for XKeycodeToKeysym. --- keys.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'keys.c') diff --git a/keys.c b/keys.c index cd8d0c4..9a0dda9 100644 --- a/keys.c +++ b/keys.c @@ -209,6 +209,7 @@ void print_key (Display * d, Keys_t * key) { char str[STR_KEY_LEN]; + int keysyms_per_keycode_return; if (verbose) { @@ -241,13 +242,8 @@ print_key (Display * d, Keys_t * key) str, str[0] ? " + " : "", key->event_type == PRESS ? "" : "Release + ", - (XKeysymToString - (XKeycodeToKeysym (d, key->key.code, 0)) != - NULL) ? XKeysymToString (XKeycodeToKeysym (d, - key->key. - code, - 0)) : - "NoSymbol"); + (XKeysymToString (*XGetKeyboardMapping(d, key->key.code, 1, &keysyms_per_keycode_return)) != NULL) ? + XKeysymToString (*XGetKeyboardMapping(d, key->key.code, 1, &keysyms_per_keycode_return)) : "NoSymbol"); } } } -- cgit v1.2.3-70-g09d2