pinentry-dmenu

a pinentry program based on dmenu
git clone anongit@rnpnr.xyz:pinentry-dmenu.git
Log | Files | Refs | Feed | README | LICENSE

Commit: f815b1cfffb4cc04d2c52679c48b59eb431505bd
Parent: d5ff854418620052ec56035dd50e034b7209b67e
Author: Quentin Rameau
Date:   Mon, 19 Mar 2018 15:42:28 +0100

Handle IME input

Thanks to nzl <uruabi@gmail.com> for the patch!

Diffstat:
Mpinentry-dmenu.c | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c @@ -360,6 +360,7 @@ setup(void) xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, win, XNFocusWindow, win, NULL); XMapRaised(dpy, win); + XSetInputFocus(dpy, win, RevertToParent, CurrentTime); if (embedded) { XSelectInput(dpy, parentwin, FocusChangeMask); @@ -570,15 +571,15 @@ paste(void) } void -run(void) { +run(void) +{ XEvent ev; drawwin(); while (!XNextEvent(dpy, &ev)) { - if (XFilterEvent(&ev, win)) { + if (XFilterEvent(&ev, None)) continue; - } switch(ev.type) { case Expose: if (ev.xexpose.count == 0) { @@ -660,6 +661,8 @@ cmdhandler(pinentry_t received_pinentry) { 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(pinentry_info->display))) { die("cannot open display"); }