Fri Mar 3 21:05:11 PST 2000 Michael Jennings <mej@eterm.org>
Tom Gilbert <gilbertt@tomgilbert.freeserve.co.uk> spotted a fallback issue with colors which I have now fixed. Tom, your e-mail address is too damned long. Just thought you should know. SVN revision: 2181
This commit is contained in:
parent
2234e70dd9
commit
32a72bb631
|
@ -3283,3 +3283,10 @@ Fri Mar 3 20:23:37 PST 2000 Michael Jennings <mej@eterm.org>
|
|||
:-)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Fri Mar 3 21:05:11 PST 2000 Michael Jennings <mej@eterm.org>
|
||||
|
||||
Tom Gilbert <gilbertt@tomgilbert.freeserve.co.uk> spotted a fallback
|
||||
issue with colors which I have now fixed. Tom, your e-mail address is
|
||||
too damned long. Just thought you should know.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
|
@ -160,6 +160,13 @@ get_color_by_name(const char *name, const char *fallback)
|
|||
{
|
||||
XColor xcol;
|
||||
|
||||
if (name == NULL) {
|
||||
if (fallback == NULL) {
|
||||
return ((Pixel) -1);
|
||||
} else {
|
||||
name = fallback;
|
||||
}
|
||||
}
|
||||
if (!XParseColor(Xdisplay, cmap, name, &xcol)) {
|
||||
print_warning("Unable to resolve \"%s\" as a color name. Falling back on \"%s\".", name, NONULL(fallback));
|
||||
name = fallback;
|
||||
|
@ -242,7 +249,7 @@ process_colors(void)
|
|||
Pixel pixel;
|
||||
|
||||
for (i = 0; i < NRS_COLORS; i++) {
|
||||
if ((Xdepth <= 2) || (!rs_color[i]) || ((pixel = get_color_by_name(rs_color[i], def_colorName[i])) == (Pixel) -1)) {
|
||||
if ((Xdepth <= 2) || ((pixel = get_color_by_name(rs_color[i], def_colorName[i])) == (Pixel) -1)) {
|
||||
switch (i) {
|
||||
case fgColor:
|
||||
pixel = WhitePixel(Xdisplay, Xscreen);
|
||||
|
|
Loading…
Reference in New Issue