pinentry-dmenu

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

Commit: f299f84b1c0f481221b86a5389cb49b5380de251
Parent: e2d42b91625346c6b73570e9384a9a32be7ae9aa
Author: Hiltjo Posthuma
Date:   Sun,  3 Mar 2019 13:08:54 +0100

revert IME support

dmenu will not handle IME support (st will, atleast for now).

revert parts of commit 377bd37e212b1ec4c03a481245603c6560d0be22
this commit also broke input focus.

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

diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c @@ -355,20 +355,12 @@ setup(void) XSetClassHint(dpy, win, &ch); /* input methods */ - if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { - XSetLocaleModifiers("@im=local"); - if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { - XSetLocaleModifiers("@im="); - if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) - die("XOpenIM failed: could not open input device"); - } - } + if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) + die("XOpenIM failed: could not open input device"); 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 | SubstructureNotifyMask); @@ -585,7 +577,7 @@ run(void) drawwin(); while (!XNextEvent(dpy, &ev)) { - if (XFilterEvent(&ev, None)) + if (XFilterEvent(&ev, win)) continue; switch(ev.type) { case DestroyNotify: @@ -673,8 +665,6 @@ 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"); }