aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorarg@10ksloc.org <unknown>2006-07-21 07:37:52 +0200
committerarg@10ksloc.org <unknown>2006-07-21 07:37:52 +0200
commitcd8d8e120857329800e93e22572e35560d1b0e80 (patch)
treed8558f0a5e9c80c63947562f53752e71602ed241 /client.c
parent04eb016e782743ec88f150ec6f5389703bed3ce2 (diff)
downloaddwm-cd8d8e120857329800e93e22572e35560d1b0e80.tar
dwm-cd8d8e120857329800e93e22572e35560d1b0e80.tar.gz
dwm-cd8d8e120857329800e93e22572e35560d1b0e80.tar.bz2
sanitization of several clunky stuff, removed heretag (rarely of use), simplified pop(), changed shortcuts to always contain MODKEY
Diffstat (limited to 'client.c')
-rw-r--r--client.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/client.c b/client.c
index 4afa705..c20c517 100644
--- a/client.c
+++ b/client.c
@@ -476,7 +476,7 @@ unmanage(Client *c)
void
zoom(Arg *arg)
{
- Client *c;
+ Client *c, **l;
if(!sel)
return;
@@ -486,6 +486,19 @@ zoom(Arg *arg)
sel = c;
}
- pop(sel);
+ /* pop */
+ for(l = &clients; *l && *l != sel; l = &(*l)->next);
+ if(sel->prev)
+ sel->prev->next = sel->next;
+ if(sel->next)
+ sel->next->prev = sel->prev;
+ *l = sel->next;
+
+ sel->prev = NULL;
+ if(clients)
+ clients->prev = sel;
+ sel->next = clients;
+ clients = sel;
+ arrange(NULL);
focus(sel);
}