aewl

diff event.c @ 676:7672a1041218

added comment to %u in config.default.h, added Button{4.5} support on mode label
author Anselm R. Garbe <arg@suckless.org>
date Wed, 10 Jan 2007 12:54:23 +0100
parents fd2ea58b0b94
children a76799907854
line diff
     1.1 --- a/event.c	Mon Jan 08 17:36:56 2007 +0100
     1.2 +++ b/event.c	Wed Jan 10 12:54:23 2007 +0100
     1.3 @@ -131,8 +131,20 @@
     1.4  				return;
     1.5  			}
     1.6  		}
     1.7 -		if((ev->x < x + bmw) && (ev->button == Button1))
     1.8 -			togglemode(NULL);
     1.9 +		if(ev->x < x + bmw)
    1.10 +			switch(ev->button) {
    1.11 +			case Button1:
    1.12 +				togglemode(NULL);
    1.13 +				break;
    1.14 +			case Button4:
    1.15 +				a.i = 1;
    1.16 +				incnmaster(&a);
    1.17 +				break;
    1.18 +			case Button5:
    1.19 +				a.i = -1;
    1.20 +				incnmaster(&a);
    1.21 +				break;
    1.22 +			}
    1.23  	}
    1.24  	else if((c = getclient(ev->window))) {
    1.25  		focus(c);