diff options
author | okan | 2015-11-12 18:33:30 +0000 |
---|---|---|
committer | okan | 2015-11-12 18:33:30 +0000 |
commit | fbe1f956e5e6aadb5e7dfb2e6dd760d444ea2fe1 (patch) | |
tree | 63138e65f5bc80b90ba21fc8c013c8e867a2757b /kbfunc.c | |
parent | 1cebeb1917e2f144081c3dea62073ffe65a6e5d8 (diff) | |
download | cwm-fbe1f956e5e6aadb5e7dfb2e6dd760d444ea2fe1.tar.gz |
If a client sets hints, honor them for kb resize requests, just like we
do for mouse based resize requests.
Based on a patch from Vadim Vygonets.
Diffstat (limited to '')
-rw-r--r-- | kbfunc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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.123 2015/11/12 18:26:41 okan Exp $ + * $OpenBSD: kbfunc.c,v 1.124 2015/11/12 18:33:30 okan Exp $ */ #include <sys/types.h> @@ -143,10 +143,10 @@ kbfunc_client_resize(struct client_ctx *cc, union arg *arg) kbfunc_amount(arg->i, &mx, &my); - if ((cc->geom.w += mx) < 1) - cc->geom.w = 1; - if ((cc->geom.h += my) < 1) - cc->geom.h = 1; + if ((cc->geom.w += mx * cc->hint.incw) < cc->hint.minw) + cc->geom.w = cc->hint.minw; + if ((cc->geom.h += my * cc->hint.inch) < cc->hint.minh) + cc->geom.h = cc->hint.minh; client_resize(cc, 1); /* Make sure the pointer stays within the window. */ |