dwm-meillo

changeset 356:c2a65784cb71

changed symbols for float/tiled mode, added mouse-driven mode toggle to buttonpress()
author Anselm R. Garbe <arg@10kloc.org>
date Fri, 25 Aug 2006 15:06:38 +0200
parents f9543a4af9e5
children 27082985e51e
files draw.c event.c
diffstat 2 files changed, 13 insertions(+), 11 deletions(-) [+]
line diff
     1.1 --- a/draw.c	Fri Aug 25 14:46:01 2006 +0200
     1.2 +++ b/draw.c	Fri Aug 25 15:06:38 2006 +0200
     1.3 @@ -94,7 +94,7 @@
     1.4  void
     1.5  drawstatus()
     1.6  {
     1.7 -	static const char *mode[] = { "~", "|" };
     1.8 +	static const char *mode[] = { "><", "|=" };
     1.9  	int i, x;
    1.10  
    1.11  	dc.x = dc.y = 0;
     2.1 --- a/event.c	Fri Aug 25 14:46:01 2006 +0200
     2.2 +++ b/event.c	Fri Aug 25 15:06:38 2006 +0200
     2.3 @@ -106,16 +106,18 @@
     2.4  
     2.5  	if(barwin == ev->window) {
     2.6  		if(ev->x < modew)
     2.7 -			return;
     2.8 -		x = modew;
     2.9 -		for(a.i = 0; a.i < ntags; a.i++) {
    2.10 -			x += textw(tags[a.i]);
    2.11 -			if(ev->x < x) {
    2.12 -				if(ev->button == Button1)
    2.13 -					view(&a);
    2.14 -				else if(ev->button == Button3)
    2.15 -					toggleview(&a);
    2.16 -				return;
    2.17 +			togglemode(NULL);
    2.18 +		else {
    2.19 +			x = modew;
    2.20 +			for(a.i = 0; a.i < ntags; a.i++) {
    2.21 +				x += textw(tags[a.i]);
    2.22 +				if(ev->x < x) {
    2.23 +					if(ev->button == Button1)
    2.24 +						view(&a);
    2.25 +					else if(ev->button == Button3)
    2.26 +						toggleview(&a);
    2.27 +					return;
    2.28 +				}
    2.29  			}
    2.30  		}
    2.31  	}