transferall.c (469B)
1 void 2 transferall(const Arg *arg) 3 { 4 Client *c, *n = selmon->clients, *attachfrom = NULL; 5 int i = 0, nstackclients = 0; 6 while (n) { 7 c = n; 8 n = c->next; 9 if (!ISVISIBLE(c) || c->isfloating) continue; 10 if (i >= selmon->nmaster) { 11 detach(c); 12 if (!attachfrom) { 13 attach(c); 14 } else { 15 c->next = attachfrom->next; 16 attachfrom->next = c; 17 } 18 attachfrom = c; 19 nstackclients++; 20 } 21 i++; 22 } 23 selmon->nmaster = nstackclients; 24 arrange(selmon); 25 } 26