aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-18 11:45:32 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-18 11:45:32 +0200
commit0aaa9a21f334a5c75b7efce2712384f57bd370cd (patch)
tree69a9ca6c1c808555ddbe9ef51620c7b1e51f1557 /client.c
parent4f8b08d330a6c377ab919f48b8e922d1c5ded601 (diff)
downloaddwm-0aaa9a21f334a5c75b7efce2712384f57bd370cd.tar.gz
pop on heretag
Diffstat (limited to 'client.c')
-rw-r--r--client.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/client.c b/client.c
index 166e979..fa48644 100644
--- a/client.c
+++ b/client.c
@@ -268,6 +268,18 @@ maximize(Arg *arg)
}
void
+pop(Client *c)
+{
+ Client **l;
+ for(l = &clients; *l && *l != c; l = &(*l)->next);
+ *l = c->next;
+
+ c->next = clients; /* pop */
+ clients = c;
+ arrange(NULL);
+}
+
+void
resize(Client *c, Bool inc)
{
XConfigureEvent e;
@@ -405,7 +417,7 @@ unmanage(Client *c)
void
zoom(Arg *arg)
{
- Client **l, *c;
+ Client *c;
if(!sel)
return;
@@ -415,11 +427,6 @@ zoom(Arg *arg)
sel = c;
}
- for(l = &clients; *l && *l != sel; l = &(*l)->next);
- *l = sel->next;
-
- sel->next = clients; /* pop */
- clients = sel;
- arrange(NULL);
+ pop(sel);
focus(sel);
}
remember that computers suck.