]> Pileus Git - wmpus/blobdiff - sys-x11.c
Fix deprecated warning XKeycodeToKeysym warning
[wmpus] / sys-x11.c
index 0d7644b859c3a67e575901802e5fc527f92d8b63..6bc3b019246ef6ceb55768b6bbb12133d9291ab8 100644 (file)
--- a/sys-x11.c
+++ b/sys-x11.c
@@ -189,10 +189,10 @@ static int strut_add(win_t *root, win_t *win)
        if (status != Success || ret_size != 32 || ret_items != 4)
                return 0;
 
-       win->sys->strut.left   = ((int*)xdata)[0];
-       win->sys->strut.right  = ((int*)xdata)[1];
-       win->sys->strut.top    = ((int*)xdata)[2];
-       win->sys->strut.bottom = ((int*)xdata)[3];
+       win->sys->strut.left   = ((long*)xdata)[0];
+       win->sys->strut.right  = ((long*)xdata)[1];
+       win->sys->strut.top    = ((long*)xdata)[2];
+       win->sys->strut.bottom = ((long*)xdata)[3];
        struts = list_insert(struts, win);
        for (list_t *cur = screens; cur; cur = cur->next)
                strut_copy(cur->data, win, 1);
@@ -356,7 +356,7 @@ static void process_event(int type, XEvent *xe, win_t *root)
        /* Split based on event */
        if (type == KeyPress) {
                while (XCheckTypedEvent(dpy, KeyPress, xe));
-               KeySym sym = XKeycodeToKeysym(dpy, xe->xkey.keycode, 0);
+               KeySym sym = XLookupKeysym(&xe->xkey, 0);
                printf("got xe %c %hhx\n", xk2ev(sym), mod2int(mod));
                wm_handle_event(win, xk2ev(sym), mod, ptr);
        }