X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=9da7ac407a5ad0cc2d5f199fde7daee92979bf28;hb=349cadacf6c978f42ca582c57413895c1be52d66;hp=650967ea335817a13bc09279236e398504315f98;hpb=9fce8215b7c1b95903adbfd0cb7d6e2822ea063f;p=dwm.git diff --git a/event.c b/event.c index 650967e..9da7ac4 100644 --- a/event.c +++ b/event.c @@ -108,10 +108,17 @@ buttonpress(XEvent *e) for(a.i = 0; a.i < ntags; a.i++) { x += textw(tags[a.i]); if(ev->x < x) { - view(&a); - break; + if(ev->button == Button3) + toggleview(&a); + else + view(&a); + return; } } + if(ev->button == Button1) + viewprev(&a); + else if(ev->button == Button3) + viewnext(&a); break; case Button4: viewprev(&a);