aewl

diff client.c @ 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
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  }