Mercurial > aewl
diff event.c @ 362:ba6c55e1b9b2
trying a different configuration
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Fri, 25 Aug 2006 15:48:44 +0200 |
parents | c2a65784cb71 |
children | fc9d35252ab4 |
line wrap: on
line diff
--- a/event.c Fri Aug 25 15:37:00 2006 +0200 +++ b/event.c Fri Aug 25 15:48:44 2006 +0200 @@ -105,21 +105,19 @@ XButtonPressedEvent *ev = &e->xbutton; if(barwin == ev->window) { - if(ev->x < modew) - 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; - } + x = 0; + 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; } } + if(ev->x < x + bmw) + togglemode(NULL); } else if((c = getclient(ev->window))) { focus(c);