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.
This commit is contained in:
parent
f3e5ba3a97
commit
b23431233d
1 changed files with 3 additions and 12 deletions
15
dmenu.c
15
dmenu.c
|
@ -740,7 +740,7 @@ run(void)
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
while (!XNextEvent(dpy, &ev)) {
|
while (!XNextEvent(dpy, &ev)) {
|
||||||
if (XFilterEvent(&ev, None))
|
if (XFilterEvent(&ev, win))
|
||||||
continue;
|
continue;
|
||||||
switch(ev.type) {
|
switch(ev.type) {
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
|
@ -859,20 +859,13 @@ setup(void)
|
||||||
|
|
||||||
|
|
||||||
/* input methods */
|
/* input methods */
|
||||||
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) {
|
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
|
||||||
XSetLocaleModifiers("@im=local");
|
die("XOpenIM failed: could not open input device");
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
|
xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
|
||||||
XNClientWindow, win, XNFocusWindow, win, NULL);
|
XNClientWindow, win, XNFocusWindow, win, NULL);
|
||||||
|
|
||||||
XMapRaised(dpy, win);
|
XMapRaised(dpy, win);
|
||||||
XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
|
|
||||||
if (embed) {
|
if (embed) {
|
||||||
XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask);
|
XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask);
|
||||||
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
|
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
|
||||||
|
@ -967,8 +960,6 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||||
fputs("warning: no locale support\n", stderr);
|
fputs("warning: no locale support\n", stderr);
|
||||||
if (!XSetLocaleModifiers(""))
|
|
||||||
fputs("warning: no locale modifiers support\n", stderr);
|
|
||||||
if (!(dpy = XOpenDisplay(NULL)))
|
if (!(dpy = XOpenDisplay(NULL)))
|
||||||
die("cannot open display");
|
die("cannot open display");
|
||||||
screen = DefaultScreen(dpy);
|
screen = DefaultScreen(dpy);
|
||||||
|
|
Loading…
Reference in a new issue