From fbf7b4caf5fa4249455501d2cffed336b3fb5bc0 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 3 Mar 2019 13:08:54 +0100 Subject: [PATCH] revert IME support dmenu will not handle IME support (st will, atleast for now). revert parts of commit 82c317ac48fcf6c63de960e219f9b77ac390d93b this commit also broke input focus. --- dmenubar/dmenu.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/dmenubar/dmenu.c b/dmenubar/dmenu.c index 3bfd74d..65f25ce 100644 --- a/dmenubar/dmenu.c +++ b/dmenubar/dmenu.c @@ -553,7 +553,7 @@ run(void) XEvent ev; while (!XNextEvent(dpy, &ev)) { - if (XFilterEvent(&ev, None)) + if (XFilterEvent(&ev, win)) continue; switch(ev.type) { case DestroyNotify: @@ -666,20 +666,13 @@ setup(void) /* 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 (embed) { XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask); if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) { @@ -745,8 +738,6 @@ 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);