aboutsummaryrefslogtreecommitdiffstats
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan2012-07-13 17:01:04 +0000
committerokan2012-07-13 17:01:04 +0000
commitb6feb9c4c70841ec78711b4ffd93e6bcd578f388 (patch)
treeb60432e1113e366850bcabfec8e5ad7788114fd9 /kbfunc.c
parenta4c958a3f89733566a15f47d5ddc0167fe5e85d4 (diff)
downloadcwm-b6feb9c4c70841ec78711b4ffd93e6bcd578f388.tar.gz
re-use geom struct in client_ctx (saved)geometry.
Diffstat (limited to '')
-rw-r--r--kbfunc.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 67179a4..056dbe9 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.61 2012/07/13 15:21:35 okan Exp $
+ * $OpenBSD: kbfunc.c,v 1.62 2012/07/13 17:01:04 okan Exp $
*/
#include <sys/param.h>
@@ -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: