X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=tag.c;h=4b6d513c06c6544c397dd5923cb69bd4deb4dcb3;hb=442334641e4124d8c32387287d431a83761ff916;hp=a718ebd2cd55a76710b10dda71c3f00f8e7b81d4;hpb=78b050c13c8ea660ed801c21bddd2957a2bc3f40;p=dwm.git diff --git a/tag.c b/tag.c index a718ebd..4b6d513 100644 --- a/tag.c +++ b/tag.c @@ -47,7 +47,9 @@ dofloat(Arg *arg) else ban(c); } - if((sel = getnext(clients))) { + if(!sel || !isvisible(sel)) + sel = getnext(clients); + if(sel) { focus(sel); restack(); } @@ -111,7 +113,9 @@ dotile(Arg *arg) else ban(c); } - if((sel = getnext(clients))) + if(!sel || !isvisible(sel)) + sel = getnext(clients); + if(sel) focus(sel); else XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);