Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
95626e11
Commit
95626e11
authored
Mar 18, 1995
by
Richard M. Stallman
Browse files
(x_decode_color): Don't use cdef if defined_color failed.
parent
92182a70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/xfns.c
src/xfns.c
+7
-5
No files found.
src/xfns.c
View file @
95626e11
...
...
@@ -1069,11 +1069,13 @@ x_decode_color (f, arg, def)
if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1)
return def;
/* Ignore the return value of defined_color so that
we use a color close to the one requested
if we can't get the exact request. */
defined_color
(
f
,
XSTRING
(
arg
)
->
data
,
&
cdef
,
1
);
/* defined_color is responsible for coping with failures
by looking for a near-miss. */
if (defined_color (f, XSTRING (arg)->data, &cdef, 1))
return cdef.pixel;
/* defined_color failed; return an ultimate default. */
return def;
}
/* Functions called only from `x_set_frame_param'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment