|
|
@ -1170,20 +1170,17 @@ movemouse(const Arg *arg)
|
|
|
|
|
|
|
|
|
|
|
|
nx = ocx + (ev.xmotion.x - x);
|
|
|
|
nx = ocx + (ev.xmotion.x - x);
|
|
|
|
ny = ocy + (ev.xmotion.y - y);
|
|
|
|
ny = ocy + (ev.xmotion.y - y);
|
|
|
|
if (nx >= selmon->wx && nx <= selmon->wx + selmon->ww
|
|
|
|
if (abs(selmon->wx - nx) < snap)
|
|
|
|
&& ny >= selmon->wy && ny <= selmon->wy + selmon->wh) {
|
|
|
|
nx = selmon->wx;
|
|
|
|
if (abs(selmon->wx - nx) < snap)
|
|
|
|
else if (abs((selmon->wx + selmon->ww) - (nx + WIDTH(c))) < snap)
|
|
|
|
nx = selmon->wx;
|
|
|
|
nx = selmon->wx + selmon->ww - WIDTH(c);
|
|
|
|
else if (abs((selmon->wx + selmon->ww) - (nx + WIDTH(c))) < snap)
|
|
|
|
if (abs(selmon->wy - ny) < snap)
|
|
|
|
nx = selmon->wx + selmon->ww - WIDTH(c);
|
|
|
|
ny = selmon->wy;
|
|
|
|
if (abs(selmon->wy - ny) < snap)
|
|
|
|
else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(c))) < snap)
|
|
|
|
ny = selmon->wy;
|
|
|
|
ny = selmon->wy + selmon->wh - HEIGHT(c);
|
|
|
|
else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(c))) < snap)
|
|
|
|
if (!c->isfloating && selmon->lt[selmon->sellt]->arrange
|
|
|
|
ny = selmon->wy + selmon->wh - HEIGHT(c);
|
|
|
|
&& (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
|
|
|
|
if (!c->isfloating && selmon->lt[selmon->sellt]->arrange
|
|
|
|
togglefloating(NULL);
|
|
|
|
&& (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
|
|
|
|
|
|
|
|
togglefloating(NULL);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
|
|
|
|
if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
|
|
|
|
resize(c, nx, ny, c->w, c->h, 1);
|
|
|
|
resize(c, nx, ny, c->w, c->h, 1);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|