# HG changeset patch # User Anselm R. Garbe # Date 1157556712 -7200 # Node ID 548084f8d92e7180cef8d996f251381cbb06cbad # Parent 056a5072c70a14f5858eab142cdb33d8f15ef7e7 this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled diff -r 056a5072c70a -r 548084f8d92e view.c --- a/view.c Wed Sep 06 15:36:42 2006 +0200 +++ b/view.c Wed Sep 06 17:31:52 2006 +0200 @@ -12,6 +12,8 @@ { Client *c, *min; + if((clients && clients->isfloat) || arrange == dofloat) + return clients; /* don't touch floating order */ for(min = c = clients; c; c = c->next) if(c->weight < min->weight) min = c; @@ -19,16 +21,6 @@ } static void -pop(Client *c) -{ - detach(c); - if(clients) - clients->prev = c; - c->next = clients; - clients = c; -} - -static void reorder() { Client *c, *newclients, *tail; @@ -232,7 +224,6 @@ return; } if(sel->isfloat || arrange == dofloat) { - pop(sel); XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->twin); } @@ -307,7 +298,11 @@ if((c = sel) == nexttiled(clients)) if(!(c = nexttiled(c->next))) return; - pop(c); + detach(c); + if(clients) + clients->prev = c; + c->next = clients; + clients = c; focus(c); arrange(NULL); }