diff options
author | okan | 2019-03-04 13:33:39 +0000 |
---|---|---|
committer | okan | 2019-03-04 13:33:39 +0000 |
commit | 0108eead09f301176b49ca9a47cf32d26714f2a9 (patch) | |
tree | a850852e961fd326c986cbccbd887dfdd0c0af39 /conf.c | |
parent | e1d11722a750db804d9c601e9bf771ec5b8ec868 (diff) | |
download | cwm-0108eead09f301176b49ca9a47cf32d26714f2a9.tar.gz |
simplify xftcolor config
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.246 2019/03/01 14:32:01 okan Exp $ + * $OpenBSD: conf.c,v 1.247 2019/03/04 13:33:39 okan Exp $ */ #include <sys/types.h> @@ -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]); |