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

revert parts of commit 377bd37e212b1ec4c03a481245603c6560d0be22
this commit also broke input focus.
Hiltjo Posthuma · 2019-03-03 13:08 1 file(s) · +3 −12
dmenu.c +3 −12
553 553
	XEvent ev;
554 554
555 555
	while (!XNextEvent(dpy, &ev)) {
556 -
		if (XFilterEvent(&ev, None))
556 +
		if (XFilterEvent(&ev, win))
557 557
			continue;
558 558
		switch(ev.type) {
559 559
		case DestroyNotify:
666 666
667 667
668 668
	/* input methods */
669 -
	if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) {
670 -
		XSetLocaleModifiers("@im=local");
671 -
		if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) {
672 -
			XSetLocaleModifiers("@im=");
673 -
			if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
674 -
				die("XOpenIM failed: could not open input device");
675 -
		}
676 -
	}
669 +
	if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
670 +
		die("XOpenIM failed: could not open input device");
677 671
678 672
	xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
679 673
	                XNClientWindow, win, XNFocusWindow, win, NULL);
680 674
681 675
	XMapRaised(dpy, win);
682 -
	XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
683 676
	if (embed) {
684 677
		XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask);
685 678
		if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
745 738
746 739
	if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
747 740
		fputs("warning: no locale support\n", stderr);
748 -
	if (!XSetLocaleModifiers(""))
749 -
		fputs("warning: no locale modifiers support\n", stderr);
750 741
	if (!(dpy = XOpenDisplay(NULL)))
751 742
		die("cannot open display");
752 743
	screen = DefaultScreen(dpy);