Replace obsolete XKeycodeToKeysym

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Gregor Best 2013-05-21 19:19:15 +02:00 committed by Julien Danjou
parent 61da4d9c22
commit ef89a3e3e6
2 changed files with 4 additions and 1 deletions

View File

@ -117,6 +117,8 @@ PKG_CHECK_MODULES([xinerama], [xinerama],,
[AC_MSG_ERROR([awesome requires Xinerama.])])
PKG_CHECK_MODULES([xrandr], [xrandr],,
[AC_MSG_ERROR([awesome requires Xrandr.])])
PKG_CHECK_MODULES([xkb], [xkbui],,
[AC_MSG_ERROR([awesome requires XKB.])])
AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build with gtk library (default: disabled)]))
if test "x$with_gtk" == "xyes"; then

View File

@ -20,6 +20,7 @@
*/
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
@ -350,7 +351,7 @@ event_handle_keypress(XEvent *e)
break;
}
keysym = XKeycodeToKeysym(globalconf.display, (KeyCode) ev->keycode, 0);
keysym = XkbKeycodeToKeysym(globalconf.display, (KeyCode) ev->keycode, 0, 0);
for(k = globalconf.keys; k; k = k->next)
if(((k->keycode && ev->keycode == k->keycode) || (k->keysym && keysym == k->keysym)) &&