Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!wuarchive!udel!haven!decuac!bacchus.pa.dec.com!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: Can XAllocColor/XAllocNamedColor fail ? Message-ID: <1990Nov8.114127@wsl.dec.com> Date: 8 Nov 90 19:41:27 GMT References: <1990Nov8.174617.10793@ecn.purdue.edu> Sender: news@wrl.dec.com (News) Reply-To: klee@wsl.dec.com Distribution: na Organization: DEC Western Software Laboratory Lines: 16 In article <1990Nov8.174617.10793@ecn.purdue.edu>, luj@delta.ecn.purdue.edu (Jun Lu) writes: |> I have a feeling that XAllocColor can never fail under normal conditions( |> valid cmap argument, normal operations of server, normal connections ) |> becasuse XAllocColor request finds the *closest* color entry in the color |> map if it is full. XAllocColor finds the closest color supported by the visual, not the closest color in the colormap. It will fail if the requested color is not in the colormap and the colormap is full. XAllocNamedColor can also fail if the specified name is not in the color database. -- Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee