XEvent ev;
while (!XNextEvent(dpy, &ev)) {
- if (XFilterEvent(&ev, win))
+ if (XFilterEvent(&ev, None))
continue;
switch(ev.type) {
case Expose:
XNClientWindow, win, XNFocusWindow, win, NULL);
XMapRaised(dpy, win);
+ XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
if (embed) {
XSelectInput(dpy, parentwin, FocusChangeMask);
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
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);