mirror of
https://github.com/0intro/wmii
synced 2024-11-25 23:30:24 +03:00
Attempt to fix dosbox/SDL focus issues.
This commit is contained in:
parent
221ac73ebe
commit
379a3f7114
@ -330,7 +330,10 @@ focus_client(Client *c) {
|
||||
|
||||
Dprint("focus_client(%p[%C]) => %s\n", c, c, clientname(c));
|
||||
|
||||
if((c == nil || !c->noinput) && screen->focus != c) {
|
||||
if (screen->focus == c)
|
||||
return;
|
||||
|
||||
if(c == nil || !c->noinput) {
|
||||
Dprint("\t%s => %s\n", clientname(screen->focus), clientname(c));
|
||||
|
||||
if(c)
|
||||
@ -342,6 +345,8 @@ focus_client(Client *c) {
|
||||
|
||||
XSync(display, False);
|
||||
flushevents(FocusChangeMask, True);
|
||||
} else if(c && c->noinput) {
|
||||
setfocus(nil, RevertToParent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -662,7 +662,11 @@ gettextproperty(Window *w, char *name) {
|
||||
|
||||
void
|
||||
setfocus(Window *w, int mode) {
|
||||
XSetInputFocus(display, w->w, mode, CurrentTime);
|
||||
if(w) {
|
||||
XSetInputFocus(display, w->w, mode, CurrentTime);
|
||||
} else { /* "relinquish" focus */
|
||||
XSetInputFocus(display, PointerRoot, mode, CurrentTime);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mouse */
|
||||
|
Loading…
Reference in New Issue
Block a user