aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index c852e92..314256f 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -552,7 +552,7 @@ run(void)
552 XEvent ev; 552 XEvent ev;
553 553
554 while (!XNextEvent(dpy, &ev)) { 554 while (!XNextEvent(dpy, &ev)) {
555 if (XFilterEvent(&ev, win)) 555 if (XFilterEvent(&ev, None))
556 continue; 556 continue;
557 switch(ev.type) { 557 switch(ev.type) {
558 case Expose: 558 case Expose:
@@ -664,6 +664,7 @@ setup(void)
664 XNClientWindow, win, XNFocusWindow, win, NULL); 664 XNClientWindow, win, XNFocusWindow, win, NULL);
665 665
666 XMapRaised(dpy, win); 666 XMapRaised(dpy, win);
667 XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
667 if (embed) { 668 if (embed) {
668 XSelectInput(dpy, parentwin, FocusChangeMask); 669 XSelectInput(dpy, parentwin, FocusChangeMask);
669 if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) { 670 if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
@@ -729,6 +730,8 @@ main(int argc, char *argv[])
729 730
730 if (!setlocale(LC_CTYPE, "") || !XSupportsLocale()) 731 if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
731 fputs("warning: no locale support\n", stderr); 732 fputs("warning: no locale support\n", stderr);
733 if (!XSetLocaleModifiers(""))
734 fputs("warning: no locale modifiers support\n", stderr);
732 if (!(dpy = XOpenDisplay(NULL))) 735 if (!(dpy = XOpenDisplay(NULL)))
733 die("cannot open display"); 736 die("cannot open display");
734 screen = DefaultScreen(dpy); 737 screen = DefaultScreen(dpy);