From 58fa7998b8e7f34ed5723094d0b3952ccf2dc509 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 19 May 2006 19:43:31 +0200 Subject: [PATCH] thx to keiss again, fixed the prevoff calculation as well --- cmd/wmiimenu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/wmiimenu.c b/cmd/wmiimenu.c index 630ad9f5..b9555634 100644 --- a/cmd/wmiimenu.c +++ b/cmd/wmiimenu.c @@ -79,7 +79,10 @@ update_offsets() w = cmdw + 2 * seek; for(i = curroff; i > 0; i--) { - w += blitz_textwidth(dpy, &draw.font, item.data[i]) + mrect.height; + tw = blitz_textwidth(dpy, &draw.font, item.data[i]); + if(tw > mrect.width / 3) + tw = mrect.width / 3; + w += tw + mrect.height; if(w > mrect.width) break; }