Mercurial > aewl
changeset 442:056a5072c70a
no this is better
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Wed, 06 Sep 2006 15:36:42 +0200 |
parents | 785bad5f21dd |
children | 548084f8d92e |
files | client.c view.c |
diffstat | 2 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/client.c Wed Sep 06 15:30:28 2006 +0200 +++ b/client.c Wed Sep 06 15:36:42 2006 +0200 @@ -99,13 +99,6 @@ } } if(c) { - if(c->isfloat || arrange == dofloat) { - detach(c); - if(clients) - clients->prev = c; - c->next = clients; - clients = c; - } grabbuttons(c, True); drawtitle(c); XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
--- a/view.c Wed Sep 06 15:30:28 2006 +0200 +++ b/view.c Wed Sep 06 15:36:42 2006 +0200 @@ -18,6 +18,15 @@ return min; } +static void +pop(Client *c) +{ + detach(c); + if(clients) + clients->prev = c; + c->next = clients; + clients = c; +} static void reorder() @@ -223,6 +232,7 @@ return; } if(sel->isfloat || arrange == dofloat) { + pop(sel); XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->twin); } @@ -297,10 +307,7 @@ if((c = sel) == nexttiled(clients)) if(!(c = nexttiled(c->next))) return; - detach(c); - c->next = clients; - clients->prev = c; - clients = c; + pop(c); focus(c); arrange(NULL); }