From 1f98e9ea8b412bc79b62580ea25566dc3a806fb5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 Feb 1995 01:25:58 +0000 Subject: [PATCH] (load_color): Ignore failure from XAllocColor. --- src/xfaces.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 36c3c1ab470..2b235e0c0c3 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -360,9 +360,9 @@ load_color (f, name) BLOCK_INPUT; result = XAllocColor (dpy, cmap, &color); UNBLOCK_INPUT; - if (! result) - Fsignal (Qerror, Fcons (build_string ("X server cannot allocate color"), - Fcons (name, Qnil))); + /* Ignore the return value of XallocColor, so that + we use a color close to the one requested + if we can't get the exact request. */ return (unsigned long) color.pixel; } -- 2.39.5