home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: mikey@eukanuba.wpd.sgi.com (Mike Yang)
- Newsgroups: fj.mail-lists.x-window
- Subject: Re: Help with Colormaps
- Message-ID: <1992Dec24.193042.15761@sm.sony.co.jp>
- Date: 24 Dec 92 19:30:42 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: Silicon Graphics, Inc.
- Lines: 28
- Approved: michael@sm.sony.co.jp
-
- Date: 23 Dec 92 20:53:26 GMT
- Message-Id: <1992Dec23.205326.4643@odin.corp.sgi.com>
- Newsgroups: comp.windows.x
- References: <7320055@hpfcso.FC.HP.COM>, <stefans.725095561@bauv106>, <judith-231292100556@mollusk.larc.nasa.gov>
- Sender: xpert-request@expo.lcs.mit.edu
-
- 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
-