Browse Source

this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled

main
Anselm R. Garbe 18 years ago
parent
commit
d22abeee86
1 changed files with 7 additions and 12 deletions
  1. +7
    -12
      view.c

+ 7
- 12
view.c View File

@ -12,22 +12,14 @@ minclient()
{ {
Client *c, *min; Client *c, *min;
if((clients && clients->isfloat) || arrange == dofloat)
return clients; /* don't touch floating order */
for(min = c = clients; c; c = c->next) for(min = c = clients; c; c = c->next)
if(c->weight < min->weight) if(c->weight < min->weight)
min = c; min = c;
return min; return min;
} }
static void
pop(Client *c)
{
detach(c);
if(clients)
clients->prev = c;
c->next = clients;
clients = c;
}
static void static void
reorder() reorder()
{ {
@ -232,7 +224,6 @@ restack()
return; return;
} }
if(sel->isfloat || arrange == dofloat) { if(sel->isfloat || arrange == dofloat) {
pop(sel);
XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->win);
XRaiseWindow(dpy, sel->twin); XRaiseWindow(dpy, sel->twin);
} }
@ -307,7 +298,11 @@ zoom(Arg *arg)
if((c = sel) == nexttiled(clients)) if((c = sel) == nexttiled(clients))
if(!(c = nexttiled(c->next))) if(!(c = nexttiled(c->next)))
return; return;
pop(c);
detach(c);
if(clients)
clients->prev = c;
c->next = clients;
clients = c;
focus(c); focus(c);
arrange(NULL); arrange(NULL);
} }

Loading…
Cancel
Save