diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-03-13 21:58:51 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-03-14 00:04:05 +0200 |
| commit | ec26c13de147ef048bb8070e11f96af4879faabd (patch) | |
| tree | 3da5af2c45baca8b7b1b78967197767811f757f6 /monsterwm.c | |
| parent | ef49b4acb3572f2871ce676de639ac3382156062 (diff) | |
Replace XKeycodeToKeysym with XkbKeycodeToKeysym
XKeycodeToKeysym is now deprecated, as per
http://www.x.org/releases/X11R7.6/changelog.txt
Dirk Wallenstein (5):
man: Redirect users from XKeycodeToKeysym to XkbKeycodeToKeysym #25732
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/monsterwm.c b/monsterwm.c index 6f2c061..b2ee3f0 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -7,9 +7,8 @@ #include <string.h> #include <signal.h> #include <sys/wait.h> -#include <X11/Xlib.h> #include <X11/Xutil.h> -#include <X11/keysym.h> +#include <X11/XKBlib.h> #include <X11/Xproto.h> #include <X11/Xatom.h> @@ -408,7 +407,7 @@ void grid(int hh, int cy) { /* on the press of a key check to see if there's a binded function to call */ void keypress(XEvent *e) { - KeySym keysym = XKeycodeToKeysym(dis, (KeyCode)e->xkey.keycode, 0); + KeySym keysym = XkbKeycodeToKeysym(dis, e->xkey.keycode, 0, 0); for (unsigned int i=0; i<LENGTH(keys); i++) if (keysym == keys[i].keysym && CLEANMASK(keys[i].mod) == CLEANMASK(e->xkey.state) && keys[i].func) keys[i].func(&keys[i].arg); |
