X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=event.c;h=187c65e63492d66a83f9a130325666ef9e205a4b;hb=442334641e4124d8c32387287d431a83761ff916;hp=5c21fcbeea6a79cef4bb1a9dd2e5c92c1bf5fc5c;hpb=4ad20ffc2c23d29329bc7349985d889f2cb45612;p=dwm.git diff --git a/event.c b/event.c index 5c21fcb..187c65e 100644 --- a/event.c +++ b/event.c @@ -109,10 +109,10 @@ buttonpress(XEvent *e) for(a.i = 0; a.i < ntags; a.i++) { x += textw(tags[a.i]); if(ev->x < x) { - if(ev->button == Button3) - toggleview(&a); - else + if(ev->button == Button1) view(&a); + else if(ev->button == Button3) + toggleview(&a); return; } }