home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20534 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.6 KB

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