Fix patch resizecorners
This commit is contained in:
parent
3f74312239
commit
25af6dd966
11
dwm.c
11
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);
|
||||
|
|
Loading…
Reference in New Issue