diff options
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -447,6 +447,8 @@ void conf_client(struct client_ctx *cc) { struct winname *wn; + unsigned int i; + XftColor xc; TAILQ_FOREACH(wn, &Conf.ignoreq, entry) { if (strncasecmp(wn->name, cc->name, strlen(wn->name)) == 0) { @@ -454,6 +456,25 @@ conf_client(struct client_ctx *cc) break; } } + + for (i = 0; i < nitems(color_binds); i++) { + if (i == CWM_COLOR_MENU_FONT_SEL && *Conf.color[i] == '\0') { + xu_xorcolor(cc->xftcolor[CWM_COLOR_MENU_BG], + cc->xftcolor[CWM_COLOR_MENU_FG], &xc); + xu_xorcolor(cc->xftcolor[CWM_COLOR_MENU_FONT], xc, &xc); + if (!XftColorAllocValue(X_Dpy, cc->visual, cc->colormap, + &xc.color, &cc->xftcolor[CWM_COLOR_MENU_FONT_SEL])) + warnx("XftColorAllocValue: %s", Conf.color[i]); + break; + } + if (!XftColorAllocName(X_Dpy, cc->visual, cc->colormap, + Conf.color[i], &cc->xftcolor[i])) { + warnx("XftColorAllocName: %s", Conf.color[i]); + XftColorAllocName(X_Dpy, cc->visual, cc->colormap, + color_binds[i], &cc->xftcolor[i]); + } + } + } void |