Re: [dev] [PATCHv2] dwm: replace deprecated XKeycodeToKeysym

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Tue, 11 Dec 2012 18:55:47 +0100

Please see the other mail. This patch won't make it into dwm, as this
doesn't work in several X server setups and we don't want to introduce
case-handling as long as the modern X servers still support the old
behavior.

Best regards,
Anselm

On 11 December 2012 10:25, Antonio Quartulli <ordex_AT_autistici.org> wrote:
> 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 - 18:55:47 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 11 2012 - 19:00:11 CET