X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=view.c;h=eddf2dadc0baf79da8afe0ff46a244efc3fbebe5;hb=a33150eb4b041b243d0493cd4b53bfbcace3299e;hp=e74d4bc96a49dc75902e076d0a531f27ef578245;hpb=fd00b3a18620c70721c4c4d9f0169e06b9ce4437;p=dwm.git diff --git a/view.c b/view.c index e74d4bc..eddf2da 100644 --- a/view.c +++ b/view.c @@ -18,6 +18,15 @@ minclient() return min; } +static void +pop(Client *c) +{ + detach(c); + if(clients) + clients->prev = c; + c->next = clients; + clients = c; +} static void reorder() @@ -223,6 +232,7 @@ restack() return; } if(sel->isfloat || arrange == dofloat) { + pop(sel); XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->twin); } @@ -297,10 +307,7 @@ zoom(Arg *arg) if((c = sel) == nexttiled(clients)) if(!(c = nexttiled(c->next))) return; - detach(c); - c->next = clients; - clients->prev = c; - clients = c; + pop(c); focus(c); arrange(NULL); }