Switch from RevertToParent to RevertToPointerRoot to fix focus issues with multiple X screens.

This commit is contained in:
sqweek 2007-11-03 02:27:23 +09:00
parent dffc0f4d93
commit 97dfe7839c
2 changed files with 4 additions and 4 deletions

View File

@ -337,16 +337,16 @@ focus_client(Client *c) {
Dprint("\t%s => %s\n", clientname(screen->focus), clientname(c));
if(c)
setfocus(&c->w, RevertToParent);
setfocus(&c->w, RevertToPointerRoot);
else
setfocus(screen->barwin, RevertToParent);
setfocus(screen->barwin, RevertToPointerRoot);
write_event("ClientFocus %C\n", c);
XSync(display, False);
flushevents(FocusChangeMask, True);
} else if(c && c->noinput) {
setfocus(nil, RevertToParent);
setfocus(nil, RevertToPointerRoot);
}
}

View File

@ -135,7 +135,7 @@ focusin(XEvent *e) {
if(ev->detail == NotifyDetailNone) {
print_focus(&c_magic, "<magic[none]>");
screen->focus = &c_magic;
setfocus(screen->barwin, RevertToParent);
setfocus(screen->barwin, RevertToPointerRoot);
return;
}