X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/fde45ebed844c227a17c21d161f60aa55c8b3c41..8278f0a6befccfb4eb156cb312c69e032158734a:/event.c diff --git a/event.c b/event.c index 25ed6fa..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); @@ -132,8 +136,7 @@ buttonpress(XEvent *e) movemouse(c); break; case Button2: - if(!c->ismax && arrange != dofloat && !c->isfloat) - zoom(NULL); + zoom(NULL); break; case Button3: if(!c->ismax && (arrange == dofloat || c->isfloat))