diff options
author | okan <okan> | 2012-07-13 17:01:04 +0000 |
---|---|---|
committer | okan <okan> | 2012-07-13 17:01:04 +0000 |
commit | 0e8815dfb02f38a622d71ea3eb5644e6d5b8fb90 (patch) | |
tree | 4eec9e571a6f54b5fcb70a6751738f819a3a9678 /kbfunc.c | |
parent | 186a78ff1e8f19155b337b68586cebc7495fcdf9 (diff) | |
download | cwm-0e8815dfb02f38a622d71ea3eb5644e6d5b8fb90.tar.gz cwm-0e8815dfb02f38a622d71ea3eb5644e6d5b8fb90.tar.xz cwm-0e8815dfb02f38a622d71ea3eb5644e6d5b8fb90.zip |
re-use geom struct in client_ctx (saved)geometry.
Diffstat (limited to 'kbfunc.c')
-rw-r--r-- | kbfunc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kbfunc.c b/kbfunc.c index 4c02610..0f95df4 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -88,22 +88,22 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg) switch (flags & TYPEMASK) { case CWM_MOVE: cc->geom.y += my; - if (cc->geom.y + cc->geom.height < 0) - cc->geom.y = -cc->geom.height; + if (cc->geom.y + cc->geom.h < 0) + cc->geom.y = -cc->geom.h; if (cc->geom.y > sc->view.h - 1) cc->geom.y = sc->view.h - 1; cc->geom.x += mx; - if (cc->geom.x + cc->geom.width < 0) - cc->geom.x = -cc->geom.width; + if (cc->geom.x + cc->geom.w < 0) + cc->geom.x = -cc->geom.w; if (cc->geom.x > sc->view.w - 1) cc->geom.x = sc->view.w - 1; cc->geom.x += client_snapcalc(cc->geom.x, - cc->geom.width, sc->view.w, + cc->geom.w, sc->view.w, cc->bwidth, Conf.snapdist); cc->geom.y += client_snapcalc(cc->geom.y, - cc->geom.height, sc->view.h, + cc->geom.h, sc->view.h, cc->bwidth, Conf.snapdist); client_move(cc); @@ -113,18 +113,18 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg) client_ptrwarp(cc); break; case CWM_RESIZE: - if ((cc->geom.height += my) < 1) - cc->geom.height = 1; - if ((cc->geom.width += mx) < 1) - cc->geom.width = 1; + if ((cc->geom.h += my) < 1) + cc->geom.h = 1; + if ((cc->geom.w += mx) < 1) + cc->geom.w = 1; client_resize(cc); /* Make sure the pointer stays within the window. */ xu_ptr_getpos(cc->win, &cc->ptr.x, &cc->ptr.y); - if (cc->ptr.x > cc->geom.width) - cc->ptr.x = cc->geom.width - cc->bwidth; - if (cc->ptr.y > cc->geom.height) - cc->ptr.y = cc->geom.height - cc->bwidth; + if (cc->ptr.x > cc->geom.w) + cc->ptr.x = cc->geom.w - cc->bwidth; + if (cc->ptr.y > cc->geom.h) + cc->ptr.y = cc->geom.h - cc->bwidth; client_ptrwarp(cc); break; case CWM_PTRMOVE: |