Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -up a/config.mk b/config.mk
- --- a/config.mk 2017-09-29 13:06:55.783472647 -0700
- +++ b/config.mk 2017-09-29 13:00:20.246627033 -0700
- @@ -27,7 +27,7 @@ LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS}
- # flags
- CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
- #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
- -CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
- +CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
- LDFLAGS = -s ${LIBS}
- # Solaris
- diff -up a/dwm.c b/dwm.c
- --- a/dwm.c 2017-09-29 13:06:55.785472631 -0700
- +++ b/dwm.c 2017-09-29 13:01:22.039135243 -0700
- @@ -988,16 +988,18 @@ void
- keypress(XEvent *e)
- {
- unsigned int i;
- - KeySym keysym;
- + KeySym *keysym;
- XKeyEvent *ev;
- + int keysyms;
- ev = &e->xkey;
- - keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
- + keysym = XGetKeyboardMapping(dpy, (KeyCode)ev->keycode, 1, &keysyms);
- for (i = 0; i < LENGTH(keys); i++)
- - if (keysym == keys[i].keysym
- + if (keysym[0] == keys[i].keysym
- && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)
- && keys[i].func)
- keys[i].func(&(keys[i].arg));
- + XFree(keysym);
- }
- void
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement