diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c index 6eebc7deb04..6f3be6d6966 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1069,11 +1069,13 @@ x_decode_color (f, arg, def) | |||
| 1069 | if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1) | 1069 | if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1) |
| 1070 | return def; | 1070 | return def; |
| 1071 | 1071 | ||
| 1072 | /* Ignore the return value of defined_color so that | 1072 | /* defined_color is responsible for coping with failures |
| 1073 | we use a color close to the one requested | 1073 | by looking for a near-miss. */ |
| 1074 | if we can't get the exact request. */ | 1074 | if (defined_color (f, XSTRING (arg)->data, &cdef, 1)) |
| 1075 | defined_color (f, XSTRING (arg)->data, &cdef, 1); | 1075 | return cdef.pixel; |
| 1076 | return cdef.pixel; | 1076 | |
| 1077 | /* defined_color failed; return an ultimate default. */ | ||
| 1078 | return def; | ||
| 1077 | } | 1079 | } |
| 1078 | 1080 | ||
| 1079 | /* Functions called only from `x_set_frame_param' | 1081 | /* Functions called only from `x_set_frame_param' |