X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=view.c;h=9ee4c7898e0b9702588262b3ab665215122caa9c;hb=d22abeee867397c366f69cf89524b94e01c2e0e2;hp=eddf2dadc0baf79da8afe0ff46a244efc3fbebe5;hpb=a33150eb4b041b243d0493cd4b53bfbcace3299e;p=dwm.git diff --git a/view.c b/view.c index eddf2da..9ee4c78 100644 --- a/view.c +++ b/view.c @@ -12,6 +12,8 @@ minclient() { Client *c, *min; + if((clients && clients->isfloat) || arrange == dofloat) + return clients; /* don't touch floating order */ for(min = c = clients; c; c = c->next) if(c->weight < min->weight) min = c; @@ -19,16 +21,6 @@ minclient() } static void -pop(Client *c) -{ - detach(c); - if(clients) - clients->prev = c; - c->next = clients; - clients = c; -} - -static void reorder() { Client *c, *newclients, *tail; @@ -232,7 +224,6 @@ restack() return; } if(sel->isfloat || arrange == dofloat) { - pop(sel); XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->twin); } @@ -307,7 +298,11 @@ zoom(Arg *arg) if((c = sel) == nexttiled(clients)) if(!(c = nexttiled(c->next))) return; - pop(c); + detach(c); + if(clients) + clients->prev = c; + c->next = clients; + clients = c; focus(c); arrange(NULL); }