Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
added general centralization rule for new clients (works around various borken apps)
[dwm.git]
/
tag.c
diff --git
a/tag.c
b/tag.c
index
a718ebd
..
841d0fc
100644
(file)
--- a/
tag.c
+++ b/
tag.c
@@
-47,7
+47,9
@@
dofloat(Arg *arg)
else
ban(c);
}
else
ban(c);
}
- if((sel = getnext(clients))) {
+ if(!sel || !isvisible(sel))
+ sel = getnext(clients);
+ if(sel) {
focus(sel);
restack();
}
focus(sel);
restack();
}
@@
-111,7
+113,9
@@
dotile(Arg *arg)
else
ban(c);
}
else
ban(c);
}
- if((sel = getnext(clients)))
+ if(!sel || !isvisible(sel))
+ sel = getnext(clients);
+ if(sel)
focus(sel);
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
focus(sel);
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
@@
-277,7
+281,10
@@
void
togglemode(Arg *arg)
{
arrange = arrange == dofloat ? dotile : dofloat;
togglemode(Arg *arg)
{
arrange = arrange == dofloat ? dotile : dofloat;
- arrange(NULL);
+ if(sel)
+ arrange(NULL);
+ else
+ drawstatus();
}
void
}
void