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. --- mousefunc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index 929fc8d..a0d1813 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: mousefunc.c,v 1.100 2015/11/10 20:05:33 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.101 2015/11/10 22:06:57 okan Exp $ */ #include @@ -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); -- cgit v1.2.3-2-gb3c3