]> git.eshelyaron.com Git - emacs.git/commitdiff
(load_color): Ignore failure from XAllocColor.
authorRichard M. Stallman <rms@gnu.org>
Sun, 12 Feb 1995 01:25:58 +0000 (01:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 12 Feb 1995 01:25:58 +0000 (01:25 +0000)
src/xfaces.c

index 36c3c1ab4707344a21c7d8c47ffed886c758d0a8..2b235e0c0c33cfa22865377e3e063026bacf15a0 100644 (file)
@@ -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;
 }