equal
deleted
inserted
replaced
36 tail = newclients = c; |
36 tail = newclients = c; |
37 } |
37 } |
38 clients = newclients; |
38 clients = newclients; |
39 } |
39 } |
40 |
40 |
|
41 static Client * |
|
42 nexttiled(Client *c) |
|
43 { |
|
44 for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next)); |
|
45 return c; |
|
46 } |
|
47 |
41 /* extern */ |
48 /* extern */ |
42 |
49 |
43 void (*arrange)(Arg *) = DEFMODE; |
50 void (*arrange)(Arg *) = DEFMODE; |
44 |
51 |
45 void |
52 void |
80 Client *c; |
87 Client *c; |
81 |
88 |
82 maximized = False; |
89 maximized = False; |
83 |
90 |
84 w = sw - mw; |
91 w = sw - mw; |
85 for(n = 0, c = clients; c && !c->isfloat; c = c->next) |
92 for(n = 0, c = clients; c; c = c->next) |
86 if(isvisible(c)) |
93 if(isvisible(c) && !c->isfloat) |
87 n++; |
94 n++; |
88 |
95 |
89 if(n > 1) |
96 if(n > 1) |
90 h = (sh - bh) / (n - 1); |
97 h = (sh - bh) / (n - 1); |
91 else |
98 else |
184 resizecol(Arg *arg) |
191 resizecol(Arg *arg) |
185 { |
192 { |
186 unsigned int n; |
193 unsigned int n; |
187 Client *c; |
194 Client *c; |
188 |
195 |
189 for(n = 0, c = clients; c && !c->isfloat; c = c->next) |
196 for(n = 0, c = clients; c; c = c->next) |
190 if(isvisible(c)) |
197 if(isvisible(c) && !c->isfloat) |
191 n++; |
198 n++; |
192 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) |
199 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) |
193 return; |
200 return; |
194 |
201 |
195 if(sel == getnext(clients)) { |
202 if(sel == getnext(clients)) { |
309 zoom(Arg *arg) |
316 zoom(Arg *arg) |
310 { |
317 { |
311 unsigned int n; |
318 unsigned int n; |
312 Client *c; |
319 Client *c; |
313 |
320 |
314 for(n = 0, c = clients; c && !c->isfloat; c = c->next) |
321 for(n = 0, c = clients; c; c = c->next) |
315 if(isvisible(c)) |
322 if(isvisible(c) && !c->isfloat) |
316 n++; |
323 n++; |
317 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) |
324 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) |
318 return; |
325 return; |
319 |
326 |
320 if((c = sel) == getnext(clients)) |
327 if((c = sel) == nexttiled(clients)) |
321 if(!(c = getnext(c->next)) || c->isfloat) |
328 if(!(c = nexttiled(c))) |
322 return; |
329 return; |
323 detach(c); |
330 detach(c); |
324 c->next = clients; |
331 c->next = clients; |
325 clients->prev = c; |
332 clients->prev = c; |
326 clients = c; |
333 clients = c; |