[hackers] [wmii] Switch logical text extents for textwidth() || Kris Maglione

From: <hg_AT_suckless.org>
Date: Tue, 14 Oct 2008 02:54:18 +0000 (UTC)

changeset: 2355:b80576b65228
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Oct 13 22:54:14 2008 -0400
files: cmd/menu/menu.c cmd/wmii/area.c cmd/wmii/x11.c
description:
Switch logical text extents for textwidth()

diff -r bfc7f8542c1f -r b80576b65228 cmd/menu/menu.c
--- a/cmd/menu/menu.c Mon Oct 13 22:25:05 2008 -0400
+++ b/cmd/menu/menu.c Mon Oct 13 22:54:14 2008 -0400
@@ -165,7 +165,7 @@
         r2.max.x = inputw;
         drawstring(ibuf, font, r2, West, filter, cnorm.fg);
 
- r2.min.x = textwidth(font, filter) + pad/2 + 1;
+ r2.min.x = textwidth(font, filter) + pad/2;
         r2.max.x = r2.min.x + 2;
         r2.min.y++;
         r2.max.y--;
diff -r bfc7f8542c1f -r b80576b65228 cmd/wmii/area.c
--- a/cmd/wmii/area.c Mon Oct 13 22:25:05 2008 -0400
+++ b/cmd/wmii/area.c Mon Oct 13 22:54:14 2008 -0400
@@ -56,7 +56,6 @@
         int colnum;
         Area *a;
 
-
         if(v->areas) { /* Creating a column. */
                 minwidth = Dx(v->r)/NCOL;
                 i = v->floating == nil;
@@ -91,9 +90,9 @@
         a->view = v;
         a->id = id++;
         if(v->areas)
+ a->mode = def.colmode;
+ else
                 a->mode = Coldefault;
- else
- a->mode = def.colmode;
         a->screen = scrn;
         a->frame = nil;
         a->sel = nil;
diff -r bfc7f8542c1f -r b80576b65228 cmd/wmii/x11.c
--- a/cmd/wmii/x11.c Mon Oct 13 22:25:05 2008 -0400
+++ b/cmd/wmii/x11.c Mon Oct 13 22:54:14 2008 -0400
@@ -675,7 +675,7 @@
         XRectangle r;
 
         if(font->set) {
- Xutf8TextExtents(font->set, text, len, &r, nil);
+ Xutf8TextExtents(font->set, text, len, nil, &r);
                 return r.width;
         }
         return XTextWidth(font->xfont, text, len);
Received on Tue Oct 14 2008 - 02:54:18 UTC

This archive was generated by hypermail 2.2.0 : Tue Oct 14 2008 - 03:00:05 UTC