mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
convert xmax/ymax uses to view geometry.
This commit is contained in:
12
kbfunc.c
12
kbfunc.c
@ -90,20 +90,20 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg)
|
||||
cc->geom.y += my;
|
||||
if (cc->geom.y + cc->geom.height < 0)
|
||||
cc->geom.y = -cc->geom.height;
|
||||
if (cc->geom.y > sc->ymax - 1)
|
||||
cc->geom.y = sc->ymax - 1;
|
||||
if (cc->geom.y > sc->view.h - 1)
|
||||
cc->geom.y = sc->view.h - 1;
|
||||
|
||||
cc->geom.x += mx;
|
||||
if (cc->geom.x + cc->geom.width < 0)
|
||||
cc->geom.x = -cc->geom.width;
|
||||
if (cc->geom.x > sc->xmax - 1)
|
||||
cc->geom.x = sc->xmax - 1;
|
||||
if (cc->geom.x > sc->view.w - 1)
|
||||
cc->geom.x = sc->view.w - 1;
|
||||
|
||||
cc->geom.x += client_snapcalc(cc->geom.x,
|
||||
cc->geom.width, sc->xmax,
|
||||
cc->geom.width, sc->view.w,
|
||||
cc->bwidth, Conf.snapdist);
|
||||
cc->geom.y += client_snapcalc(cc->geom.y,
|
||||
cc->geom.height, sc->ymax,
|
||||
cc->geom.height, sc->view.h,
|
||||
cc->bwidth, Conf.snapdist);
|
||||
|
||||
client_move(cc);
|
||||
|
Reference in New Issue
Block a user