[hackers] [dwm][PATCH] replace (deprecated) XKeycodeTokeysym() with XkbKeycodeToKeysym()

From: UserXGnu <user_x_AT_riseup.net>
Date: Sat, 14 Oct 2017 08:54:55 -0300

---
 dwm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dwm.c b/dwm.c
index 4782343..1c6b589 100644
--- a/dwm.c
+++ b/dwm.c
_AT_@ -32,6 +32,7 @@
 #include <sys/wait.h>
 #include <X11/cursorfont.h>
 #include <X11/keysym.h>
+#include <X11/XKBlib.h>
 #include <X11/Xatom.h>
 #include <X11/Xlib.h>
 #include <X11/Xproto.h>
_AT_@ -992,8 +993,8 @@ keypress(XEvent *e)
 	XKeyEvent *ev;
 	ev = &e->xkey;
-	keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
-	for (i = 0; i < LENGTH(keys); i++)
+    keysym = XkbKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0, 0);
+    for (i = 0; i < LENGTH(keys); i++)
 		if (keysym == keys[i].keysym
 		&& CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)
 		&& keys[i].func)
--
2.14.2
--
Victor Flores (a.k.a UserX)
9D7A 24DC 3B16 DDFA DDE6  61E0 3657 4BF2 74EC 8397

Received on Sat Oct 14 2017 - 13:54:55 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 14 2017 - 14:00:20 CEST