move the rest of xft init into screen_conf, since most of it is based on

config parameters.
This commit is contained in:
okan
2013-05-19 23:16:29 +00:00
parent dac00a232f
commit e41c84c752
3 changed files with 8 additions and 15 deletions

9
conf.c
View File

@ -103,7 +103,14 @@ conf_screen(struct screen_ctx *sc)
sc->gap = Conf.gap;
font_init(sc, Conf.font);
sc->xftdraw = XftDrawCreate(X_Dpy, sc->rootwin,
sc->visual, sc->colormap);
if (sc->xftdraw == NULL)
errx(1, "XftDrawCreate");
sc->xftfont = XftFontOpenName(X_Dpy, sc->which, Conf.font);
if (sc->xftfont == NULL)
errx(1, "XftFontOpenName");
for (i = 0; i < CWM_COLOR_MAX; i++) {
if (*Conf.color[i] == '\0')