diff options
author | okan <okan> | 2019-03-04 13:33:39 +0000 |
---|---|---|
committer | okan <okan> | 2019-03-04 13:33:39 +0000 |
commit | 0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c (patch) | |
tree | 338a509669167d10f73ef9fbc1caa81b684aae09 /conf.c | |
parent | 9d252184582d96dd916bc97675d6a35a18921140 (diff) | |
download | cwm-0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c.tar.gz cwm-0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c.tar.xz cwm-0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c.zip |
simplify xftcolor config
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/conf.c b/conf.c index d6b0dd1..d600728 100644 --- a/conf.c +++ b/conf.c @@ -493,11 +493,8 @@ conf_screen(struct screen_ctx *sc) warnx("XftColorAllocValue: %s", Conf.color[i]); break; } - if (XftColorAllocName(X_Dpy, sc->visual, sc->colormap, - Conf.color[i], &xc)) { - sc->xftcolor[i] = xc; - XftColorFree(X_Dpy, sc->visual, sc->colormap, &xc); - } else { + if (!XftColorAllocName(X_Dpy, sc->visual, sc->colormap, + Conf.color[i], &sc->xftcolor[i])) { warnx("XftColorAllocName: %s", Conf.color[i]); XftColorAllocName(X_Dpy, sc->visual, sc->colormap, color_binds[i], &sc->xftcolor[i]); |