summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2015-11-10 22:06:57 +0000
committerokan <okan>2015-11-10 22:06:57 +0000
commit09565bc42362bb3a9fd24c75441e89c723114364 (patch)
tree588bb44d6b9f863d91d033eb984270e14676ad20 /mousefunc.c
parente20110f3445ba7f388482f5be7b72a922e548c92 (diff)
downloadcwm-09565bc42362bb3a9fd24c75441e89c723114364.tar.gz
cwm-09565bc42362bb3a9fd24c75441e89c723114364.tar.xz
cwm-09565bc42362bb3a9fd24c75441e89c723114364.zip
Use position on root to figure out region.
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 565e4c2..b58c717 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -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);