Browse Source

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

main
Anselm R. Garbe 18 years ago
parent
commit
d37dfa1bed
2 changed files with 13 additions and 11 deletions
  1. +1
    -1
      draw.c
  2. +12
    -10
      event.c

+ 1
- 1
draw.c View File

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


+ 12
- 10
event.c View File

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


Loading…
Cancel
Save