summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-06 17:31:52 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-06 17:31:52 +0200
commitd22abeee867397c366f69cf89524b94e01c2e0e2 (patch)
tree85e2334cb1ad5e94fe1083da6a38d4eeb9af5eef
parentno this is better (diff)
downloaddwm-d22abeee867397c366f69cf89524b94e01c2e0e2.tar.gz
dwm-d22abeee867397c366f69cf89524b94e01c2e0e2.zip
this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Diffstat (limited to '')
-rw-r--r--view.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/view.c b/view.c
index eddf2da..9ee4c78 100644
--- a/view.c
+++ b/view.c
@@ -12,6 +12,8 @@ minclient()
12{ 12{
13 Client *c, *min; 13 Client *c, *min;
14 14
15 if((clients && clients->isfloat) || arrange == dofloat)
16 return clients; /* don't touch floating order */
15 for(min = c = clients; c; c = c->next) 17 for(min = c = clients; c; c = c->next)
16 if(c->weight < min->weight) 18 if(c->weight < min->weight)
17 min = c; 19 min = c;
@@ -19,16 +21,6 @@ minclient()
19} 21}
20 22
21static void 23static void
22pop(Client *c)
23{
24 detach(c);
25 if(clients)
26 clients->prev = c;
27 c->next = clients;
28 clients = c;
29}
30
31static void
32reorder() 24reorder()
33{ 25{
34 Client *c, *newclients, *tail; 26 Client *c, *newclients, *tail;
@@ -232,7 +224,6 @@ restack()
232 return; 224 return;
233 } 225 }
234 if(sel->isfloat || arrange == dofloat) { 226 if(sel->isfloat || arrange == dofloat) {
235 pop(sel);
236 XRaiseWindow(dpy, sel->win); 227 XRaiseWindow(dpy, sel->win);
237 XRaiseWindow(dpy, sel->twin); 228 XRaiseWindow(dpy, sel->twin);
238 } 229 }
@@ -307,7 +298,11 @@ zoom(Arg *arg)
307 if((c = sel) == nexttiled(clients)) 298 if((c = sel) == nexttiled(clients))
308 if(!(c = nexttiled(c->next))) 299 if(!(c = nexttiled(c->next)))
309 return; 300 return;
310 pop(c); 301 detach(c);
302 if(clients)
303 clients->prev = c;
304 c->next = clients;
305 clients = c;
311 focus(c); 306 focus(c);
312 arrange(NULL); 307 arrange(NULL);
313} 308}