home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!sgigate!odin!eukanuba.wpd.sgi.com!mikey
- From: mikey@eukanuba.wpd.sgi.com (Mike Yang)
- Newsgroups: comp.windows.x
- Subject: Re: Help with Colormaps
- Message-ID: <1992Dec23.205326.4643@odin.corp.sgi.com>
- Date: 23 Dec 92 20:53:26 GMT
- References: <1h5ac3INN11v@rave.larc.nasa.gov> <7320055@hpfcso.FC.HP.COM> <stefans.725095561@bauv106> <judith-231292100556@mollusk.larc.nasa.gov>
- Sender: news@odin.corp.sgi.com (Net News)
- Reply-To: mikey@sgi.com
- Organization: Silicon Graphics, Inc.
- Lines: 22
- Nntp-Posting-Host: eukanuba.wpd.sgi.com
-
- In article <judith-231292100556@mollusk.larc.nasa.gov>, judith@mermaid.larc.nasa.gov (Judith Moore) writes:
- |> What happens is, my image appears in the window with the default
- |> colormap, and just sits there. The XSetWindowColormap() call
- |> appears to have no effect whatsoever.
- |>
- |> If I do the XSetWindowColormap() _before_ XMapWindow(), I get the
- |> grayscale I expect. But then I can't change _that_ to anything
- |> else.
-
- The window manager needs to install your colormap for you (see ICCCM).
- By default, it will install your top-level window's colormap for you.
- If you use XSetWindowColormap before mapping, it installs your
- colormap.
-
- Once you do this, your colormap should be installed whenever "colormap
- focus," as defined by your window manager, is set to your window.
- This probably is the same as "input focus." Then, you can just use
- XStoreColors on your colormap to cause immediate display changes.
-
- -----------------------------------------------------------------------
- Mike Yang Silicon Graphics, Inc.
- mikey@sgi.com 415/390-1786
-