aboutsummaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'event.c')
-rw-r--r--event.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/event.c b/event.c
index 650967e..53a110a 100644
--- a/event.c
+++ b/event.c
@@ -103,15 +103,19 @@ buttonpress(XEvent *e)
if(barwin == ev->window) {
switch(ev->button) {
- default:
+ case Button1:
x = 0;
for(a.i = 0; a.i < ntags; a.i++) {
x += textw(tags[a.i]);
if(ev->x < x) {
view(&a);
- break;
+ return;
}
}
+ focusprev(NULL);
+ break;
+ case Button3:
+ focusnext(NULL);
break;
case Button4:
viewprev(&a);