summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2019-03-04 13:33:39 +0000
committerokan <okan>2019-03-04 13:33:39 +0000
commit0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c (patch)
tree338a509669167d10f73ef9fbc1caa81b684aae09
parent9d252184582d96dd916bc97675d6a35a18921140 (diff)
downloadcwm-0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c.tar.gz
cwm-0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c.tar.xz
cwm-0c0551b8bffd9a978247a9c6b98e84a9bdd6f76c.zip
simplify xftcolor config
-rw-r--r--conf.c7
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]);