X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=acf1b01ea1da5476178020e8b83a658df110fa44;hb=12d5a26fd279cc2370954929dedf88d0ab205a16;hp=ae08f86f86f5117000339c2cdefe444853805180;hpb=2c477cf66147d369ae8ff17acdce743c6811ee6a;p=dwm.git diff --git a/event.c b/event.c index ae08f86..acf1b01 100644 --- a/event.c +++ b/event.c @@ -113,29 +113,29 @@ resizemouse(Client *c) { static void buttonpress(XEvent *e) { - static char arg[8]; - int i, x; + static char buf[32]; + unsigned int i, x; Client *c; XButtonPressedEvent *ev = &e->xbutton; - arg[0] = 0; + buf[0] = 0; if(barwin == ev->window) { x = 0; for(i = 0; i < ntags; i++) { x += textw(tags[i]); if(ev->x < x) { - snprintf(arg, sizeof arg, "%d", i); + snprintf(buf, sizeof buf, "%d", i); if(ev->button == Button1) { if(ev->state & MODKEY) - tag(arg); + tag(buf); else - view(arg); + view(buf); } else if(ev->button == Button3) { if(ev->state & MODKEY) - toggletag(arg); + toggletag(buf); else - toggleview(arg); + toggleview(buf); } return; } @@ -143,7 +143,7 @@ buttonpress(XEvent *e) { if(ev->x < x + blw) switch(ev->button) { case Button1: - setlayout("-1"); + setlayout(NULL); break; } }