#include <X11/cursorfont.h>
#include <X11/keysym.h>
+#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xproto.h>
struct key *kp;
struct swm_region *r;
- keysym = XKeycodeToKeysym(display, (KeyCode)ev->keycode, 0);
+ keysym = XkbKeycodeToKeysym(display, (KeyCode)ev->keycode, 0, 0);
if ((kp = key_lookup(CLEANMASK(ev->state), keysym)) == NULL)
return;
if (keyfuncs[kp->funcid].func == NULL)
/* init all workspaces */
/* XXX these should be dynamically allocated too */
- for (j = 0; j < workspace_limit; j++) {
+ for (j = 0; j < SWM_WS_MAX; j++) {
ws = &screens[i].ws[j];
ws->idx = j;
ws->name = NULL;