aewl
changeset 94:6efe82c775c9
pop on heretag
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Tue, 18 Jul 2006 11:45:32 +0200 |
parents | c498da7520c7 |
children | 5d88952cbf96 |
files | client.c dwm.h tag.c |
diffstat | 3 files changed, 16 insertions(+), 8 deletions(-) [+] |
line diff
1.1 --- a/client.c Tue Jul 18 11:38:31 2006 +0200 1.2 +++ b/client.c Tue Jul 18 11:45:32 2006 +0200 1.3 @@ -268,6 +268,18 @@ 1.4 } 1.5 1.6 void 1.7 +pop(Client *c) 1.8 +{ 1.9 + Client **l; 1.10 + for(l = &clients; *l && *l != c; l = &(*l)->next); 1.11 + *l = c->next; 1.12 + 1.13 + c->next = clients; /* pop */ 1.14 + clients = c; 1.15 + arrange(NULL); 1.16 +} 1.17 + 1.18 +void 1.19 resize(Client *c, Bool inc) 1.20 { 1.21 XConfigureEvent e; 1.22 @@ -405,7 +417,7 @@ 1.23 void 1.24 zoom(Arg *arg) 1.25 { 1.26 - Client **l, *c; 1.27 + Client *c; 1.28 1.29 if(!sel) 1.30 return; 1.31 @@ -415,11 +427,6 @@ 1.32 sel = c; 1.33 } 1.34 1.35 - for(l = &clients; *l && *l != sel; l = &(*l)->next); 1.36 - *l = sel->next; 1.37 - 1.38 - sel->next = clients; /* pop */ 1.39 - clients = sel; 1.40 - arrange(NULL); 1.41 + pop(sel); 1.42 focus(sel); 1.43 }
2.1 --- a/dwm.h Tue Jul 18 11:38:31 2006 +0200 2.2 +++ b/dwm.h Tue Jul 18 11:45:32 2006 +0200 2.3 @@ -118,6 +118,7 @@ 2.4 extern void lower(Client *c); 2.5 extern void manage(Window w, XWindowAttributes *wa); 2.6 extern void maximize(Arg *arg); 2.7 +extern void pop(Client *c); 2.8 extern void resize(Client *c, Bool inc); 2.9 extern void setsize(Client *c); 2.10 extern void settitle(Client *c);