summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-05 19:26:34 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-05 19:26:34 +0200
commit0d0e8bde134b999dd22c891d227d886ca6c9ba2c (patch)
tree8ec3962fd9f3a010acd6484ebb86012b1bd4d554
parentfix (diff)
downloaddwm-0d0e8bde134b999dd22c891d227d886ca6c9ba2c.tar.gz
dwm-0d0e8bde134b999dd22c891d227d886ca6c9ba2c.zip
no, ordering floating clients at the end seems better
Diffstat (limited to '')
-rw-r--r--client.c2
-rw-r--r--tag.c9
-rw-r--r--view.c25
3 files changed, 17 insertions, 19 deletions
diff --git a/client.c b/client.c
index 4f2a69c..ecb9178 100644
--- a/client.c
+++ b/client.c
@@ -247,6 +247,8 @@ manage(Window w, XWindowAttributes *wa)
247 c->isfloat = trans 247 c->isfloat = trans
248 || (c->maxw && c->minw && 248 || (c->maxw && c->minw &&
249 c->maxw == c->minw && c->maxh == c->minh); 249 c->maxw == c->minw && c->maxh == c->minh);
250 if(c->isfloat)
251 c->weight = ntags;
250 252
251 if(clients) 253 if(clients)
252 clients->prev = c; 254 clients->prev = c;
diff --git a/tag.c b/tag.c
index 9e997f9..48abc26 100644
--- a/tag.c
+++ b/tag.c
@@ -106,7 +106,8 @@ settags(Client *c)
106 if(!matched) 106 if(!matched)
107 for(i = 0; i < ntags; i++) 107 for(i = 0; i < ntags; i++)
108 c->tags[i] = seltag[i]; 108 c->tags[i] = seltag[i];
109 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++); 109 if(!c->isfloat)
110 for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
110} 111}
111 112
112void 113void
@@ -120,7 +121,8 @@ tag(Arg *arg)
120 for(i = 0; i < ntags; i++) 121 for(i = 0; i < ntags; i++)
121 sel->tags[i] = False; 122 sel->tags[i] = False;
122 sel->tags[arg->i] = True; 123 sel->tags[arg->i] = True;
123 sel->weight = arg->i; 124 if(!sel->isfloat)
125 sel->weight = arg->i;
124 arrange(NULL); 126 arrange(NULL);
125} 127}
126 128
@@ -136,6 +138,7 @@ toggletag(Arg *arg)
136 for(i = 0; i < ntags && !sel->tags[i]; i++); 138 for(i = 0; i < ntags && !sel->tags[i]; i++);
137 if(i == ntags) 139 if(i == ntags)
138 sel->tags[arg->i] = True; 140 sel->tags[arg->i] = True;
139 sel->weight = (i == ntags) ? arg->i : i; 141 if(!sel->isfloat)
142 sel->weight = (i == ntags) ? arg->i : i;
140 arrange(NULL); 143 arrange(NULL);
141} 144}
diff --git a/view.c b/view.c
index 561d4ef..8df93ef 100644
--- a/view.c
+++ b/view.c
@@ -82,8 +82,8 @@ dotile(Arg *arg)
82 maximized = False; 82 maximized = False;
83 83
84 w = sw - mw; 84 w = sw - mw;
85 for(n = 0, c = clients; c; c = c->next) 85 for(n = 0, c = clients; c && !c->isfloat; c = c->next)
86 if(isvisible(c) && !c->isfloat) 86 if(isvisible(c))
87 n++; 87 n++;
88 88
89 if(n > 1) 89 if(n > 1)
@@ -186,8 +186,8 @@ resizecol(Arg *arg)
186 unsigned int n; 186 unsigned int n;
187 Client *c; 187 Client *c;
188 188
189 for(n = 0, c = clients; c; c = c->next) 189 for(n = 0, c = clients; c && !c->isfloat; c = c->next)
190 if(isvisible(c) && !c->isfloat) 190 if(isvisible(c))
191 n++; 191 n++;
192 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) 192 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
193 return; 193 return;
@@ -311,22 +311,15 @@ zoom(Arg *arg)
311 unsigned int n; 311 unsigned int n;
312 Client *c; 312 Client *c;
313 313
314 for(n = 0, c = clients; c; c = c->next) 314 for(n = 0, c = clients; c && !c->isfloat; c = c->next)
315 if(isvisible(c) && !c->isfloat) 315 if(isvisible(c))
316 n++; 316 n++;
317 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) 317 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
318 return; 318 return;
319 319
320 /* this is somewhat tricky, it asserts to only zoom tiled clients */ 320 if((c = sel) == getnext(clients))
321 for(c = getnext(clients); c && c->isfloat; c = getnext(c->next)); 321 if(!(c = getnext(c->next)) || c->isfloat)
322 if(c) { 322 return;
323 if(c == sel)
324 for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
325 else
326 c = sel;
327 }
328 if(!c)
329 return;
330 detach(c); 323 detach(c);
331 c->next = clients; 324 c->next = clients;
332 clients->prev = c; 325 clients->prev = c;