diff options
author | okan <okan> | 2009-12-08 16:52:17 +0000 |
---|---|---|
committer | okan <okan> | 2009-12-08 16:52:17 +0000 |
commit | ee7df6a95f80bebc9ec2d8571c1ff8ff2f53cfd0 (patch) | |
tree | 72d45dd2b4f7a08e9fa71bd138354cd9741f33b5 /font.c | |
parent | aa88d5848e0b3ee3ea7c64c7582eddd963dcecb2 (diff) | |
download | cwm-ee7df6a95f80bebc9ec2d8571c1ff8ff2f53cfd0.tar.gz cwm-ee7df6a95f80bebc9ec2d8571c1ff8ff2f53cfd0.tar.xz cwm-ee7df6a95f80bebc9ec2d8571c1ff8ff2f53cfd0.zip |
start fixing screen_ctx usage, for it is utterly broken. bring font
into screen_ctx and start passing screen_ctx around to in order get rid of Curscreen; fixup per-screen config colors the same way. diff mostly from oga@, with a bit harsher reaction to the state of screen_ctx. "please commit" oga@
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/font.c b/font.c index 0322d50..0f58c82 100644 --- a/font.c +++ b/font.c @@ -33,11 +33,11 @@ font_init(struct screen_ctx *sc) } int -font_width(const char *text, int len) +font_width(struct screen_ctx *sc, const char *text, int len) { XGlyphInfo extents; - XftTextExtents8(X_Dpy, Conf.DefaultFont, (const XftChar8*)text, + XftTextExtents8(X_Dpy, sc->font, (const XftChar8*)text, len, &extents); return (extents.xOff); @@ -49,7 +49,7 @@ font_draw(struct screen_ctx *sc, const char *text, int len, { XftDrawChange(sc->xftdraw, d); /* Really needs to be UTF8'd. */ - XftDrawString8(sc->xftdraw, &sc->xftcolor, Conf.DefaultFont, x, y, + XftDrawString8(sc->xftdraw, &sc->xftcolor, sc->font, x, y, (const FcChar8*)text, len); } |