/** * move and resize a window with the keyboard */ void moveresize(const Arg *arg) { Desktop *d = &desktops[currdeskidx]; XWindowAttributes wa; if (!d->curr || !XGetWindowAttributes(dis, d->curr->win, &wa)) return; if (!d->curr->isfloat && !d->curr->istrans) { d->curr->isfloat = True; tile(d); focus(d->curr, d); } XMoveResizeWindow(dis, d->curr->win, wa.x + ((int *)arg->v)[0], wa.y + ((int *)arg->v)[1], (wa.width + ((int *)arg->v)[2] <= MINWSZ)?wa.width:wa.width + ((int *)arg->v)[2], /* I edited this line */ (wa.height + ((int *)arg->v)[3] <= MINWSZ)?wa.height:wa.height + ((int *)arg->v)[3]); /* and this one because wm * closed when shrinking a window too small. * I've just added the check for MINWSZ which was missing */ }