home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 18894 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  1.7 KB

  1. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
  2. From: mikey@eukanuba.wpd.sgi.com (Mike Yang)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: Help with Colormaps
  5. Message-ID: <1992Dec24.193042.15761@sm.sony.co.jp>
  6. Date: 24 Dec 92 19:30:42 GMT
  7. Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
  8. Distribution: fj
  9. Organization: Silicon Graphics, Inc.
  10. Lines: 28
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: 23 Dec 92 20:53:26 GMT
  14. Message-Id: <1992Dec23.205326.4643@odin.corp.sgi.com>
  15. Newsgroups: comp.windows.x
  16. References: <7320055@hpfcso.FC.HP.COM>, <stefans.725095561@bauv106>, <judith-231292100556@mollusk.larc.nasa.gov>
  17. Sender: xpert-request@expo.lcs.mit.edu
  18.  
  19. In article <judith-231292100556@mollusk.larc.nasa.gov>, judith@mermaid.larc.nasa.gov (Judith Moore) writes:
  20. |> What happens is, my image appears in the window with the default
  21. |> colormap, and just sits there.  The XSetWindowColormap() call
  22. |> appears to have no effect whatsoever.  
  23. |> 
  24. |> If I do the XSetWindowColormap() _before_ XMapWindow(), I get the
  25. |> grayscale I expect.  But then I can't change _that_ to anything 
  26. |> else.
  27.  
  28. The window manager needs to install your colormap for you (see ICCCM).
  29. By default, it will install your top-level window's colormap for you.
  30. If you use XSetWindowColormap before mapping, it installs your
  31. colormap.
  32.  
  33. Once you do this, your colormap should be installed whenever "colormap
  34. focus," as defined by your window manager, is set to your window.
  35. This probably is the same as "input focus."  Then, you can just use
  36. XStoreColors on your colormap to cause immediate display changes.
  37.  
  38. -----------------------------------------------------------------------
  39.                  Mike Yang        Silicon Graphics, Inc.
  40.                mikey@sgi.com           415/390-1786
  41.