mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Use position on root to figure out region.
This commit is contained in:
parent
e20110f344
commit
09565bc423
5
kbfunc.c
5
kbfunc.c
@ -101,9 +101,8 @@ kbfunc_client_moveresize(struct client_ctx *cc, union arg *arg)
|
||||
if (cc->geom.y > sc->view.h - 1)
|
||||
cc->geom.y = sc->view.h - 1;
|
||||
|
||||
rc = region_find(sc,
|
||||
cc->geom.x + cc->geom.w / 2,
|
||||
cc->geom.y + cc->geom.h / 2);
|
||||
xu_ptr_getpos(cc->win, &x, &y);
|
||||
rc = region_find(sc, x + 1, y + 1);
|
||||
cc->geom.x += client_snapcalc(cc->geom.x,
|
||||
cc->geom.x + cc->geom.w + (cc->bwidth * 2),
|
||||
rc->work.x, rc->work.x + rc->work.w, sc->snapdist);
|
||||
|
@ -150,8 +150,7 @@ mousefunc_client_move(struct client_ctx *cc, union arg *arg)
|
||||
cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
|
||||
|
||||
rc = region_find(sc,
|
||||
cc->geom.x + cc->geom.w / 2,
|
||||
cc->geom.y + cc->geom.h / 2);
|
||||
ev.xmotion.x_root, ev.xmotion.y_root);
|
||||
cc->geom.x += client_snapcalc(cc->geom.x,
|
||||
cc->geom.x + cc->geom.w + (cc->bwidth * 2),
|
||||
rc->work.x, rc->work.x + rc->work.w, sc->snapdist);
|
||||
|
Loading…
Reference in New Issue
Block a user