aewl
diff view.c @ 443:548084f8d92e
this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Wed, 06 Sep 2006 17:31:52 +0200 |
parents | 056a5072c70a |
children | a2e587651c79 |
line diff
1.1 --- a/view.c Wed Sep 06 15:36:42 2006 +0200 1.2 +++ b/view.c Wed Sep 06 17:31:52 2006 +0200 1.3 @@ -12,6 +12,8 @@ 1.4 { 1.5 Client *c, *min; 1.6 1.7 + if((clients && clients->isfloat) || arrange == dofloat) 1.8 + return clients; /* don't touch floating order */ 1.9 for(min = c = clients; c; c = c->next) 1.10 if(c->weight < min->weight) 1.11 min = c; 1.12 @@ -19,16 +21,6 @@ 1.13 } 1.14 1.15 static void 1.16 -pop(Client *c) 1.17 -{ 1.18 - detach(c); 1.19 - if(clients) 1.20 - clients->prev = c; 1.21 - c->next = clients; 1.22 - clients = c; 1.23 -} 1.24 - 1.25 -static void 1.26 reorder() 1.27 { 1.28 Client *c, *newclients, *tail; 1.29 @@ -232,7 +224,6 @@ 1.30 return; 1.31 } 1.32 if(sel->isfloat || arrange == dofloat) { 1.33 - pop(sel); 1.34 XRaiseWindow(dpy, sel->win); 1.35 XRaiseWindow(dpy, sel->twin); 1.36 } 1.37 @@ -307,7 +298,11 @@ 1.38 if((c = sel) == nexttiled(clients)) 1.39 if(!(c = nexttiled(c->next))) 1.40 return; 1.41 - pop(c); 1.42 + detach(c); 1.43 + if(clients) 1.44 + clients->prev = c; 1.45 + c->next = clients; 1.46 + clients = c; 1.47 focus(c); 1.48 arrange(NULL); 1.49 }