[dev] [PATCHv2] dwm: replace deprecated XKeycodeToKeysym

From: Antonio Quartulli <ordex_AT_autistici.org>
Date: Tue, 11 Dec 2012 10:25:10 +0100

XKeycodeToKeysym is now deprecated in favour of XkbKeycodeToKeysym
(X11/XKBlib.h). This patch substitutes the former with the
latter in dwm.c

Signed-off-by: Antonio Quartulli <ordex_AT_autistici.org>
---
 dwm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dwm.c b/dwm.c
index d9443da..5d497b0 100644
--- a/dwm.c
+++ b/dwm.c
_AT_@ -33,6 +33,7 @@
 #include <X11/cursorfont.h>
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
+#include <X11/XKBlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xproto.h>
 #include <X11/Xutil.h>
_AT_@ -1080,7 +1081,7 @@ keypress(XEvent *e) {
 	XKeyEvent *ev;
 
 	ev = &e->xkey;
-	keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
+	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)
-- 
1.8.0
Received on Tue Dec 11 2012 - 10:25:10 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 11 2012 - 10:36:07 CET