--- a/client.c Tue Jul 18 11:38:31 2006 +0200
+++ b/client.c Tue Jul 18 11:45:32 2006 +0200
@@ -268,6 +268,18 @@
}
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 @@
void
zoom(Arg *arg)
{
- Client **l, *c;
+ Client *c;
if(!sel)
return;
@@ -415,11 +427,6 @@
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);
}
--- a/dwm.h Tue Jul 18 11:38:31 2006 +0200
+++ b/dwm.h Tue Jul 18 11:45:32 2006 +0200
@@ -118,6 +118,7 @@
extern void lower(Client *c);
extern void manage(Window w, XWindowAttributes *wa);
extern void maximize(Arg *arg);
+extern void pop(Client *c);
extern void resize(Client *c, Bool inc);
extern void setsize(Client *c);
extern void settitle(Client *c);
--- a/tag.c Tue Jul 18 11:38:31 2006 +0200
+++ b/tag.c Tue Jul 18 11:45:32 2006 +0200
@@ -136,7 +136,7 @@
for(i = 0; i < TLast; i++)
c->tags[i] = NULL;
c->tags[tsel] = tags[tsel];
- arrange(NULL);
+ pop(c);
focus(c);
}