summaryrefslogtreecommitdiff
path: root/app/cwm/kbfunc.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2015-11-10 22:06:58 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2015-11-10 22:06:58 +0000
commitb25fd1841959db221c442110c93e83145826b5d5 (patch)
treed6bc5e84e6fabbad0f2d881e9ddde606c66a3c3a /app/cwm/kbfunc.c
parent02add558861e61335f362c7d8c94913584335225 (diff)
Use position on root to figure out region.
Diffstat (limited to 'app/cwm/kbfunc.c')
-rw-r--r--app/cwm/kbfunc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/cwm/kbfunc.c b/app/cwm/kbfunc.c
index 537d8e0bd..2b402c937 100644
--- a/app/cwm/kbfunc.c
+++ b/app/cwm/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 <sys/types.h>
@@ -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);