From 4aca2b876485fa011298c9d7c0fe5b296b2ed122 Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 12 Nov 2015 18:33:30 +0000 Subject: 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. --- kbfunc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kbfunc.c') diff --git a/kbfunc.c b/kbfunc.c index 121ae7d..e5e0708 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -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. */ -- cgit 1.4.1