X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=tag.c;h=c42a76063d3d25cfd3dd66abf34051a772cb83e0;hb=7b5638f61d5c8b5a76bc3f7a5962cb7490da3b6b;hp=67e2498326a821ff32aa3f89fa89aaf1f9a49131;hpb=0464e42231199d7a6ea45e46cf7798f2b6cf972c;p=dwm.git diff --git a/tag.c b/tag.c index 67e2498..c42a760 100644 --- a/tag.c +++ b/tag.c @@ -63,10 +63,12 @@ dofloat(Arg *arg) ban(c); } if(sel && !sel->tags[tsel]) { - if((sel = getnext(clients, tsel))) { + if((sel = getnext(clients))) { higher(sel); focus(sel); } + else + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); } drawall(); } @@ -126,18 +128,20 @@ dotile(Arg *arg) ban(c); } if(!sel || (sel && !sel->tags[tsel])) { - if((sel = getnext(clients, tsel))) { + if((sel = getnext(clients))) { higher(sel); focus(sel); } + else + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); } drawall(); } Client * -getnext(Client *c, unsigned int t) +getnext(Client *c) { - for(; c && !c->tags[t]; c = c->next); + for(; c && !c->tags[tsel]; c = c->next); return c; }