diff --git a/dwm b/dwm index 6fee684..d042682 100755 Binary files a/dwm and b/dwm differ diff --git a/dwm.c b/dwm.c index 50304c4..49996c7 100644 --- a/dwm.c +++ b/dwm.c @@ -1437,10 +1437,15 @@ resizemouse(const Arg *arg) continue; lasttime = ev.xmotion.time; - nx = horizcorner ? ev.xmotion.x : c->x; - ny = vertcorner ? ev.xmotion.y : c->y; + nx = horizcorner && ocx2 - ev.xmotion.x >= c->minw ? ev.xmotion.x : c->x; + ny = vertcorner && ocy2 - ev.xmotion.y >= c->minh ? ev.xmotion.y : c->y; nw = MAX(horizcorner ? (ocx2 - nx) : (ev.xmotion.x - ocx - 2 * c->bw + 1), 1); nh = MAX(vertcorner ? (ocy2 - ny) : (ev.xmotion.y - ocy - 2 * c->bw + 1), 1); + if (horizcorner && ev.xmotion.x > ocx2) + nx = ocx2 - (nw = c->minw); + if (vertcorner && ev.xmotion.y > ocy2) + ny = ocy2 - (nh = c->minh); + if (c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww && c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh) { @@ -1449,7 +1454,7 @@ resizemouse(const Arg *arg) togglefloating(NULL); } if (!selmon->lt[selmon->sellt]->arrange || c->isfloating) - resize(c, c->x, c->y, nw, nh, 1); + resize(c, nx, ny, nw, nh, 1); break; } } while (ev.type != ButtonRelease); diff --git a/dwm.o b/dwm.o index ba5a39d..b2b247f 100644 Binary files a/dwm.o and b/dwm.o differ