summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Antti K2014-07-29 17:50:26 +0200
committerGravatar Antti K2014-07-30 01:11:08 +0200
commit471861c4d501df6d941bd7431918cf181d506e15 (patch)
treeccbcf7c275ed082efac95d731f7a30271a84e560
parentb6cde371b2edfcbff8743f6d0cb1b99f7dac853a (diff)
downloadxkbcat-471861c4d501df6d941bd7431918cf181d506e15.tar.gz
xkbcat-471861c4d501df6d941bd7431918cf181d506e15.zip
Replace deprecated XKeycodeToKeysym
...with XKB's equivalent. `-Wall` without warnings, yey.
-rw-r--r--xkbcat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xkbcat.c b/xkbcat.c
index c09bec3..17b4ecc 100644
--- a/xkbcat.c
+++ b/xkbcat.c
@@ -15,6 +15,7 @@
#include <X11/Xlib.h>
#include <X11/X.h>
+#include <X11/XKBlib.h>
#include <string.h>
#include <stdio.h>
@@ -110,7 +111,7 @@ int main(int argc, char *argv[]) {
char *KeyCodeToStr(int code, int down) {
static char *str, buf[KEYSYM_STRLEN + 1];
- KeySym keysym = XKeycodeToKeysym(disp, code, 0);
+ KeySym keysym = XkbKeycodeToKeysym(disp, code, 0, 0);
if (NoSymbol == keysym) return "";
/* convert keysym to a string, copy it to a local area */