X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=53a110a6d48d49c884bb69c7c2ab555808039681;hb=8278f0a6befccfb4eb156cb312c69e032158734a;hp=650967ea335817a13bc09279236e398504315f98;hpb=d3969634ac3b2e145402295e9833ce149f87fe45;p=dwm.git 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);