changed symbols for float/tiled mode, added mouse-driven mode toggle to buttonpress()

This commit is contained in:
Anselm R. Garbe 2006-08-25 15:06:38 +02:00
parent 9f35cc52fe
commit d37dfa1bed
2 changed files with 13 additions and 11 deletions

2
draw.c
View file

@ -94,7 +94,7 @@ drawall()
void void
drawstatus() drawstatus()
{ {
static const char *mode[] = { "~", "|" }; static const char *mode[] = { "><", "|=" };
int i, x; int i, x;
dc.x = dc.y = 0; dc.x = dc.y = 0;

22
event.c
View file

@ -106,16 +106,18 @@ buttonpress(XEvent *e)
if(barwin == ev->window) { if(barwin == ev->window) {
if(ev->x < modew) if(ev->x < modew)
return; togglemode(NULL);
x = modew; else {
for(a.i = 0; a.i < ntags; a.i++) { x = modew;
x += textw(tags[a.i]); for(a.i = 0; a.i < ntags; a.i++) {
if(ev->x < x) { x += textw(tags[a.i]);
if(ev->button == Button1) if(ev->x < x) {
view(&a); if(ev->button == Button1)
else if(ev->button == Button3) view(&a);
toggleview(&a); else if(ev->button == Button3)
return; toggleview(&a);
return;
}
} }
} }
} }