X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/dfa5ea63600d8c68bbe05fbc80191bd3198510b2..08d85d6d66bc4493414d76e470e473fa689c5990:/tag.c 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