From 29e76eaac34fcdbc70eaccb72c3f68b638a4c5b2 Mon Sep 17 00:00:00 2001 From: okan Date: Tue, 10 Nov 2015 22:06:57 +0000 Subject: Use position on root to figure out region. --- kbfunc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index 537d8e0..2b402c9 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: kbfunc.c,v 1.120 2015/11/10 20:05:33 okan Exp $ + * $OpenBSD: kbfunc.c,v 1.121 2015/11/10 22:06:57 okan Exp $ */ #include @@ -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); -- cgit v1.2.3-2-gb3c3