tWe need all the colors to be available, so die() on some not available. - st -… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit ed5b8700a6e6c14b814dcc2e54a90eb1868070b5 | |
parent d7b1e31eec9a87c666334006de25a7f8102c55a9 | |
Author: Christoph Lohmann <[email protected]> | |
Date: Sat, 29 Sep 2012 11:23:34 +0200 | |
We need all the colors to be available, so die() on some not available. | |
This is a new opportunity to see if X11 somewhen handled colors in a strange | |
way. | |
Diffstat: | |
M st.c | 10 ++-------- | |
1 file changed, 2 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -1915,17 +1915,12 @@ xloadcols(void) { | |
int i, r, g, b; | |
XRenderColor xft_color = { .alpha = 0 }; | |
- /* load default white color */ | |
- if(!XftColorAllocName(xw.dpy, xw.vis, xw.cmap, colorname[256], &dc.xft… | |
- die("Could not allocate color '%s'\n", colorname[256]); | |
- | |
/* load colors [0-15] colors and [256-LEN(colorname)[ (config.h) */ | |
for(i = 0; i < LEN(colorname); i++) { | |
if(!colorname[i]) | |
continue; | |
if(!XftColorAllocName(xw.dpy, xw.vis, xw.cmap, colorname[i], &… | |
- dc.xft_col[i] = dc.xft_col[256]; | |
- fprintf(stderr, "Could not allocate color '%s'\n", col… | |
+ die("Could not allocate color '%s'\n", colorname[i]); | |
} | |
} | |
t@@ -1937,8 +1932,7 @@ xloadcols(void) { | |
xft_color.green = g == 0 ? 0 : 0x3737 + 0x2828… | |
xft_color.blue = b == 0 ? 0 : 0x3737 + 0x2828 … | |
if(!XftColorAllocValue(xw.dpy, xw.vis, xw.cmap… | |
- dc.xft_col[i] = dc.xft_col[256]; | |
- fprintf(stderr, "Could not allocate co… | |
+ die("Could not allocate color %d\n", i… | |
} | |
i++; | |
} |