X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=tag.c;h=cdb0f5242e5438ae29a6d1fa24e2ffe723a68274;hb=b5c2412d848011ebf0f29c73d4ca01f52006990c;hp=4b6d513c06c6544c397dd5923cb69bd4deb4dcb3;hpb=dfa5ea63600d8c68bbe05fbc80191bd3198510b2;p=dwm.git diff --git a/tag.c b/tag.c index 4b6d513..cdb0f52 100644 --- a/tag.c +++ b/tag.c @@ -49,12 +49,11 @@ dofloat(Arg *arg) } if(!sel || !isvisible(sel)) sel = getnext(clients); - if(sel) { + if(sel) focus(sel); - restack(); - } else XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + restack(); } void @@ -281,7 +280,10 @@ void togglemode(Arg *arg) { arrange = arrange == dofloat ? dotile : dofloat; - arrange(NULL); + if(sel) + arrange(NULL); + else + drawstatus(); } void