JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
convert from deprecated XKeycodeToKeysym to XkbKeycodeToKeysym
[spectrwm.git] / spectrwm.c
index 9a61347..1002ee6 100644 (file)
@@ -88,6 +88,7 @@
 
 #include <X11/cursorfont.h>
 #include <X11/keysym.h>
+#include <X11/XKBlib.h>
 #include <X11/Xatom.h>
 #include <X11/Xlib.h>
 #include <X11/Xproto.h>
@@ -6155,7 +6156,7 @@ keypress(XEvent *e)
        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)
@@ -6927,7 +6928,7 @@ setup_screens(void)
 
                /* 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;