diff options
author | okan <okan> | 2016-09-13 13:42:28 +0000 |
---|---|---|
committer | okan <okan> | 2016-09-13 13:42:28 +0000 |
commit | a94254137c6916d65be42fb90a9e60c384b8a088 (patch) | |
tree | d18fef14c3aea674ac1f8e5b33623e0e351ea012 /mousefunc.c | |
parent | e1234b75b8d9ba3dc414af1fc2e04f159a5d6f7e (diff) | |
download | cwm-a94254137c6916d65be42fb90a9e60c384b8a088.tar.gz cwm-a94254137c6916d65be42fb90a9e60c384b8a088.tar.xz cwm-a94254137c6916d65be42fb90a9e60c384b8a088.zip |
Limit mouse resize to hints within the client; matches kbd resize
behaviour.
Diffstat (limited to 'mousefunc.c')
-rw-r--r-- | mousefunc.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mousefunc.c b/mousefunc.c index e2f91d4..36f9460 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -57,7 +57,6 @@ mousefunc_client_resize(struct client_ctx *cc, union arg *arg) XEvent ev; Time ltime = 0; struct screen_ctx *sc = cc->sc; - int x = cc->geom.x, y = cc->geom.y; if (cc->flags & CLIENT_FREEZE) return; @@ -81,12 +80,8 @@ mousefunc_client_resize(struct client_ctx *cc, union arg *arg) continue; ltime = ev.xmotion.time; - cc->geom.w = abs(x - ev.xmotion.x_root) - cc->bwidth; - cc->geom.h = abs(y - ev.xmotion.y_root) - cc->bwidth; - cc->geom.x = (x <= ev.xmotion.x_root) ? - x : x - cc->geom.w; - cc->geom.y = (y <= ev.xmotion.y_root) ? - y : y - cc->geom.h; + cc->geom.w = ev.xmotion.x; + cc->geom.h = ev.xmotion.y; client_applysizehints(cc); client_resize(cc, 1); mousefunc_sweep_draw(cc); |