From 38ae2bcc17938580c59bc558f8f25f5b37b6c434 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 17 May 2010 12:29:18 -0400 Subject: [PATCH] Ensure a positive label height. Closes issue #169. --- cmd/wmii/x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/wmii/x11.c b/cmd/wmii/x11.c index e4c26674..7fdc9606 100644 --- a/cmd/wmii/x11.c +++ b/cmd/wmii/x11.c @@ -800,7 +800,7 @@ textwidth(Font *font, char *text) { uint labelh(Font *font) { - return font->height + font->descent + font->pad.min.y + font->pad.max.y; + return max(font->height + font->descent + font->pad.min.y + font->pad.max.y, 1); } /* Misc */