diff options
author | Quentin Rameau <quinq@fifth.space> | 2018-03-19 15:42:28 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2018-04-22 14:09:05 +0200 |
commit | 377bd37e212b1ec4c03a481245603c6560d0be22 (patch) | |
tree | 1c0dce9b2169056ff28200d02ca7cd85dc7b65c2 /dmenu.c | |
parent | b6d2cc9aea979cb3557db39dbe65a2870d13e597 (diff) | |
download | dmenu-377bd37e212b1ec4c03a481245603c6560d0be22.tar.gz dmenu-377bd37e212b1ec4c03a481245603c6560d0be22.tar.bz2 dmenu-377bd37e212b1ec4c03a481245603c6560d0be22.zip |
Handle IME input
Thanks to nzl <uruabi@gmail.com> for the patch!
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -552,7 +552,7 @@ run(void) XEvent ev; while (!XNextEvent(dpy, &ev)) { - if (XFilterEvent(&ev, win)) + if (XFilterEvent(&ev, None)) continue; switch(ev.type) { case Expose: @@ -664,6 +664,7 @@ setup(void) XNClientWindow, win, XNFocusWindow, win, NULL); XMapRaised(dpy, win); + XSetInputFocus(dpy, win, RevertToParent, CurrentTime); if (embed) { XSelectInput(dpy, parentwin, FocusChangeMask); if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) { @@ -729,6 +730,8 @@ main(int argc, char *argv[]) if (!setlocale(LC_CTYPE, "") || !XSupportsLocale()) fputs("warning: no locale support\n", stderr); + if (!XSetLocaleModifiers("")) + fputs("warning: no locale modifiers support\n", stderr); if (!(dpy = XOpenDisplay(NULL))) die("cannot open display"); screen = DefaultScreen(dpy); |