From d37dfa1bedbfadb5d39aa1937e77d4fd44319018 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 25 Aug 2006 15:06:38 +0200 Subject: changed symbols for float/tiled mode, added mouse-driven mode toggle to buttonpress() --- event.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'event.c') diff --git a/event.c b/event.c index 86fb43b..35cd4f9 100644 --- a/event.c +++ b/event.c @@ -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; + } } } } -- cgit v1.2.3-70-g09d2