Mercurial > dwm-meillo
comparison view.c @ 658:b4d1ef7e407f
fixing some minor issues
author | Anselm R. Garbe <arg@suckless.org> |
---|---|
date | Fri, 05 Jan 2007 16:35:45 +0100 |
parents | c30805f6bb08 |
children | 498b86c72a40 |
comparison
equal
deleted
inserted
replaced
657:ce3538c5c0d9 | 658:b4d1ef7e407f |
---|---|
30 } | 30 } |
31 | 31 |
32 static void | 32 static void |
33 swap(Client *c1, Client *c2) { | 33 swap(Client *c1, Client *c2) { |
34 Client tmp = *c1; | 34 Client tmp = *c1; |
35 Client *cp = c1->prev; | 35 Client *c1p = c1->prev; |
36 Client *cn = c1->next; | 36 Client *c1n = c1->next; |
37 Client *c2p = c2->prev; | |
38 Client *c2n = c2->next; | |
37 | 39 |
38 *c1 = *c2; | 40 *c1 = *c2; |
39 c1->prev = cp; | |
40 c1->next = cn; | |
41 cp = c2->prev; | |
42 cn = c2->next; | |
43 *c2 = tmp; | 41 *c2 = tmp; |
44 c2->prev = cp; | 42 c1->prev = c1p; |
45 c2->next = cn; | 43 c1->next = c1n; |
44 c2->prev = c2p; | |
45 c2->next = c2n; | |
46 } | 46 } |
47 | 47 |
48 static void | 48 static void |
49 togglemax(Client *c) { | 49 togglemax(Client *c) { |
50 XEvent ev; | 50 XEvent ev; |
190 } | 190 } |
191 } | 191 } |
192 | 192 |
193 void | 193 void |
194 incnmaster(Arg *arg) { | 194 incnmaster(Arg *arg) { |
195 if(nmaster + arg->i < 1 || (wah / (nmaster + arg->i) < bh)) | 195 if((nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh)) |
196 return; | 196 return; |
197 nmaster += arg->i; | 197 nmaster += arg->i; |
198 | |
199 arrange(); | 198 arrange(); |
200 } | 199 } |
201 | 200 |
202 Bool | 201 Bool |
203 isvisible(Client *c) { | 202 isvisible(Client *c) { |
303 } | 302 } |
304 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) | 303 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) |
305 n++; | 304 n++; |
306 | 305 |
307 c = sel; | 306 c = sel; |
308 if(n <= nmaster || (arrange == dofloat)) | 307 if(arrange == dofloat) |
308 return; | |
309 else if(n <= nmaster) | |
309 pop(c); | 310 pop(c); |
310 else if(ismaster(sel)) { | 311 else if(ismaster(sel)) { |
311 if(!(c = topofstack())) | 312 if(!(c = topofstack())) |
312 return; | 313 return; |
313 swap(c, sel); | 314 swap(c, sel); |