X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=c7a0b150b8f09b055df796002a0ca58f4d94fbe6;hb=8a6679b3b4999559059df3ae9e08951099511036;hp=86fb43b0424ad6275c003341fd301fd6faea5808;hpb=b55bd709ee6d0b09c141bf5ffe0647866e0374ef;p=dwm.git diff --git a/event.c b/event.c index 86fb43b..c7a0b15 100644 --- a/event.c +++ b/event.c @@ -105,9 +105,7 @@ buttonpress(XEvent *e) XButtonPressedEvent *ev = &e->xbutton; if(barwin == ev->window) { - if(ev->x < modew) - return; - x = modew; + x = 0; for(a.i = 0; a.i < ntags; a.i++) { x += textw(tags[a.i]); if(ev->x < x) { @@ -118,10 +116,14 @@ buttonpress(XEvent *e) return; } } + if(ev->x < x + bmw) { + if(ev->button == Button1) + togglemode(NULL); + } } else if((c = getclient(ev->window))) { focus(c); - if(CLEANMASK(ev->state) == 0) + if(CLEANMASK(ev->state) != MODKEY) return; switch(ev->button) { default: