summaryrefslogtreecommitdiffstats
path: root/view.c
diff options
context:
space:
mode:
authorarg@mig29 <unknown>2006-11-22 16:17:50 +0100
committerarg@mig29 <unknown>2006-11-22 16:17:50 +0100
commit321e8d51edb8fe433e8e2ce8d5463c6999cc0576 (patch)
tree9e81a8c26380624457292923992b1287710d4c13 /view.c
parentadded a similiar patch to Daves solution to indicate if there are clients wit... (diff)
downloaddwm-321e8d51edb8fe433e8e2ce8d5463c6999cc0576.tar.gz
dwm-321e8d51edb8fe433e8e2ce8d5463c6999cc0576.zip
fififif
Diffstat (limited to '')
-rw-r--r--view.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/view.c b/view.c
index bd43da9..e7d7a99 100644
--- a/view.c
+++ b/view.c
@@ -6,42 +6,12 @@
6/* static */ 6/* static */
7 7
8static Client * 8static Client *
9minclient(void) {
10 Client *c, *min;
11
12 if((clients && clients->isfloat) || arrange == dofloat)
13 return clients; /* don't touch floating order */
14 for(min = c = clients; c; c = c->next)
15 if(c->weight < min->weight)
16 min = c;
17 return min;
18}
19
20static Client *
21nexttiled(Client *c) { 9nexttiled(Client *c) {
22 for(c = getnext(c); c && c->isfloat; c = getnext(c->next)); 10 for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
23 return c; 11 return c;
24} 12}
25 13
26static void 14static void
27reorder(void) {
28 Client *c, *newclients, *tail;
29
30 newclients = tail = NULL;
31 while((c = minclient())) {
32 detach(c);
33 if(tail) {
34 c->prev = tail;
35 tail->next = c;
36 tail = c;
37 }
38 else
39 tail = newclients = c;
40 }
41 clients = newclients;
42}
43
44static void
45togglemax(Client *c) { 15togglemax(Client *c) {
46 XEvent ev; 16 XEvent ev;
47 17
@@ -247,7 +217,6 @@ toggleview(Arg *arg) {
247 for(i = 0; i < ntags && !seltag[i]; i++); 217 for(i = 0; i < ntags && !seltag[i]; i++);
248 if(i == ntags) 218 if(i == ntags)
249 seltag[arg->i] = True; /* cannot toggle last view */ 219 seltag[arg->i] = True; /* cannot toggle last view */
250 reorder();
251 arrange(); 220 arrange();
252} 221}
253 222
@@ -258,7 +227,6 @@ view(Arg *arg) {
258 for(i = 0; i < ntags; i++) 227 for(i = 0; i < ntags; i++)
259 seltag[i] = False; 228 seltag[i] = False;
260 seltag[arg->i] = True; 229 seltag[arg->i] = True;
261 reorder();
262 arrange(); 230 arrange();
263} 231}
264 232
@@ -268,7 +236,6 @@ viewall(Arg *arg) {
268 236
269 for(i = 0; i < ntags; i++) 237 for(i = 0; i < ntags; i++)
270 seltag[i] = True; 238 seltag[i] = True;
271 reorder();
272 arrange(); 239 arrange();
273} 240}
274 241