}
}
if(ev->x < x + blw) {
- if(ev->button == Button1)
+ if(ev->button == Button1)
togglelayout(NULL);
- else if(ev->button == Button3)
+ else if(ev->button == Button3)
togglemax(NULL);
}
}
for(i = clients; i != sel; i = i->next)
if (!i->isbanned)
c = i;
- if(!c)
+ if(!c)
for(; i; i = i->next)
if (!i->isbanned)
c = i;
void
togglelayout(const Arg *arg) {
- if(arg->v)
+ if(arg && arg->v)
lt = (Layout *)arg->v;
else if(++lt == &layouts[LENGTH(layouts)])
lt = &layouts[0];