summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c21
-rw-r--r--dwm.h1
-rw-r--r--tag.c2
3 files changed, 16 insertions, 8 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)
268} 268}
269 269
270void 270void
271pop(Client *c)
272{
273 Client **l;
274 for(l = &clients; *l && *l != c; l = &(*l)->next);
275 *l = c->next;
276
277 c->next = clients; /* pop */
278 clients = c;
279 arrange(NULL);
280}
281
282void
271resize(Client *c, Bool inc) 283resize(Client *c, Bool inc)
272{ 284{
273 XConfigureEvent e; 285 XConfigureEvent e;
@@ -405,7 +417,7 @@ unmanage(Client *c)
405void 417void
406zoom(Arg *arg) 418zoom(Arg *arg)
407{ 419{
408 Client **l, *c; 420 Client *c;
409 421
410 if(!sel) 422 if(!sel)
411 return; 423 return;
@@ -415,11 +427,6 @@ zoom(Arg *arg)
415 sel = c; 427 sel = c;
416 } 428 }
417 429
418 for(l = &clients; *l && *l != sel; l = &(*l)->next); 430 pop(sel);
419 *l = sel->next;
420
421 sel->next = clients; /* pop */
422 clients = sel;
423 arrange(NULL);
424 focus(sel); 431 focus(sel);
425} 432}
diff --git a/dwm.h b/dwm.h
index 0d37e99..f2356a3 100644
--- a/dwm.h
+++ b/dwm.h
@@ -118,6 +118,7 @@ extern void killclient(Arg *arg);
118extern void lower(Client *c); 118extern void lower(Client *c);
119extern void manage(Window w, XWindowAttributes *wa); 119extern void manage(Window w, XWindowAttributes *wa);
120extern void maximize(Arg *arg); 120extern void maximize(Arg *arg);
121extern void pop(Client *c);
121extern void resize(Client *c, Bool inc); 122extern void resize(Client *c, Bool inc);
122extern void setsize(Client *c); 123extern void setsize(Client *c);
123extern void settitle(Client *c); 124extern void settitle(Client *c);
diff --git a/tag.c b/tag.c
index 3837fbd..fce3c6e 100644
--- a/tag.c
+++ b/tag.c
@@ -136,7 +136,7 @@ heretag(Arg *arg)
136 for(i = 0; i < TLast; i++) 136 for(i = 0; i < TLast; i++)
137 c->tags[i] = NULL; 137 c->tags[i] = NULL;
138 c->tags[tsel] = tags[tsel]; 138 c->tags[tsel] = tags[tsel];
139 arrange(NULL); 139 pop(c);
140 focus(c); 140 focus(c);
141} 141}
142 142