aewl

diff cmd.c @ 26:e8f627998d6f

simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
author Anselm R. Garbe <garbeam@wmii.de>
date Wed, 12 Jul 2006 15:17:22 +0200
parents 95ffdfd0a819
children
line diff
     1.1 --- a/cmd.c	Wed Jul 12 00:53:11 2006 +0200
     1.2 +++ b/cmd.c	Wed Jul 12 15:17:22 2006 +0200
     1.3 @@ -23,16 +23,18 @@
     1.4  sel(void *aux)
     1.5  {
     1.6  	const char *arg = aux;
     1.7 -	Client *c;
     1.8 +	Client *c = NULL;
     1.9  
    1.10  	if(!arg || !stack)
    1.11  		return;
    1.12  	if(!strncmp(arg, "next", 5))
    1.13 -		focus(stack->snext ? stack->snext : stack);
    1.14 -	else if(!strncmp(arg, "prev", 5)) {
    1.15 +		c = stack->snext ? stack->snext : stack;
    1.16 +	else if(!strncmp(arg, "prev", 5))
    1.17  		for(c = stack; c && c->snext; c = c->snext);
    1.18 -		focus(c ? c : stack);
    1.19 -	}
    1.20 +	if(!c)
    1.21 +		c = stack;
    1.22 +	raise(c);
    1.23 +	focus(c);
    1.24  }
    1.25  
    1.26  void