X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sys-x11.c;h=6bc3b019246ef6ceb55768b6bbb12133d9291ab8;hb=a7cbcfd5a5e2ded8cfc04ef6679acc8c3e227da7;hp=0d7644b859c3a67e575901802e5fc527f92d8b63;hpb=bafa6f74e4a8112b650cb1aa2894bc5c0184fca5;p=wmpus diff --git a/sys-x11.c b/sys-x11.c index 0d7644b..6bc3b01 100644 --- 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); }