From 6a40eff8ae4a2b0ff999aa5e201e06c76bac181b Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 2 Jan 2014 20:58:20 +0000 Subject: When a client doesn't specify size hints, nothing prevents a resize to 0x0 - don't allow this situation during mouse resize (check already in place for kbd resize). Reported by brynet@ --- client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client.c') diff --git a/client.c b/client.c index df25f72..f4b4cb3 100644 --- a/client.c +++ b/client.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: client.c,v 1.165 2013/12/17 16:10:43 okan Exp $ + * $OpenBSD: client.c,v 1.166 2014/01/02 20:58:20 okan Exp $ */ #include @@ -832,6 +832,9 @@ client_applysizehints(struct client_ctx *cc) cc->geom.w = MIN(cc->geom.w, cc->hint.maxw); if (cc->hint.maxh) cc->geom.h = MIN(cc->geom.h, cc->hint.maxh); + + cc->geom.w = MAX(cc->geom.w, 1); + cc->geom.h = MAX(cc->geom.h, 1); } static void -- cgit v1.2.3-2-gb3c3