commit 7860d65c33b4ad9cd5ccaf96889a691016fabba9
parent 89f0ba20160251cbe58c59fa5075dd2b73d4574e
Author: Kris Maglione <jg@suckless.org>
Date: Mon, 13 Oct 2008 22:54:14 -0400
Switch logical text extents for textwidth()
Diffstat:
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/cmd/menu/menu.c b/cmd/menu/menu.c
@@ -165,7 +165,7 @@ menu_draw(void) {
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 --git a/cmd/wmii/area.c b/cmd/wmii/area.c
@@ -56,7 +56,6 @@ area_create(View *v, Area *pos, int scrn, uint w) {
int colnum;
Area *a;
-
if(v->areas) { /* Creating a column. */
minwidth = Dx(v->r)/NCOL;
i = v->floating == nil;
@@ -91,9 +90,9 @@ area_create(View *v, Area *pos, int scrn, uint w) {
a->view = v;
a->id = id++;
if(v->areas)
- a->mode = Coldefault;
- else
a->mode = def.colmode;
+ else
+ a->mode = Coldefault;
a->screen = scrn;
a->frame = nil;
a->sel = nil;
diff --git a/cmd/wmii/x11.c b/cmd/wmii/x11.c
@@ -675,7 +675,7 @@ textwidth_l(Font *font, char *text, uint len) {
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);