mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
fix off-by-one in geom.[xy], after pwin changes. keyboard movement
to the rightmost or bottommost corners would confuse cwm: - there's no way to get the window back - tab cycling breaks ok okan@, oga@
This commit is contained in:
parent
6ad198022b
commit
4fe12f528c
8
kbfunc.c
8
kbfunc.c
@ -80,14 +80,14 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg)
|
|||||||
cc->geom.y += my;
|
cc->geom.y += my;
|
||||||
if (cc->geom.y + cc->geom.height < 0)
|
if (cc->geom.y + cc->geom.height < 0)
|
||||||
cc->geom.y = -cc->geom.height;
|
cc->geom.y = -cc->geom.height;
|
||||||
if (cc->geom.y > cc->sc->ymax)
|
if (cc->geom.y > cc->sc->ymax - 1)
|
||||||
cc->geom.y = cc->sc->ymax;
|
cc->geom.y = cc->sc->ymax - 1;
|
||||||
|
|
||||||
cc->geom.x += mx;
|
cc->geom.x += mx;
|
||||||
if (cc->geom.x + cc->geom.width < 0)
|
if (cc->geom.x + cc->geom.width < 0)
|
||||||
cc->geom.x = -cc->geom.width;
|
cc->geom.x = -cc->geom.width;
|
||||||
if (cc->geom.x > cc->sc->xmax)
|
if (cc->geom.x > cc->sc->xmax - 1)
|
||||||
cc->geom.x = cc->sc->xmax;
|
cc->geom.x = cc->sc->xmax - 1;
|
||||||
|
|
||||||
client_move(cc);
|
client_move(cc);
|
||||||
xu_ptr_getpos(cc->win, &x, &y);
|
xu_ptr_getpos(cc->win, &x, &y);
|
||||||
|
Loading…
Reference in New Issue
Block a user