[hackers] [dmenu] revert IME support || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sun, 3 Mar 2019 13:09:25 +0100 (CET)

commit db6093f6ec1bb884f7540f2512935b5254750b30
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Sun Mar 3 13:08:54 2019 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sun Mar 3 13:08:54 2019 +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.

diff --git a/dmenu.c b/dmenu.c
index 3bfd74d..65f25ce 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -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:
_AT_@ -666,20 +666,13 @@ setup(void)
 
 
         /* input methods */
- if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) {
- XSetLocaleModifiers("_AT_im=local");
- if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) {
- XSetLocaleModifiers("_AT_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) {
_AT_@ -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);
Received on Sun Mar 03 2019 - 13:09:25 CET

This archive was generated by hypermail 2.3.0 : Sun Mar 03 2019 - 13:12:25 CET