summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2019-03-03 13:08:54 +0100
committerJustin Ludwig <justin@jludwig.net>2020-11-26 00:35:10 -0800
commitb23431233d2d5dd3f35a28f0c63ece2e065163ac (patch)
treed09bedc2ccf73893362602db09c441903e50a16d
parentf3e5ba3a97326653beca855bcb0ff7fd3b47b532 (diff)
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.
-rw-r--r--dmenu.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/dmenu.c b/dmenu.c
index ead3c41..bde0869 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -740,7 +740,7 @@ run(void)
XEvent ev;
while (!XNextEvent(dpy, &ev)) {
- if (XFilterEvent(&ev, None))
+ if (XFilterEvent(&ev, win))
continue;
switch(ev.type) {
case ButtonPress:
@@ -859,20 +859,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) {
@@ -967,8 +960,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);