home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20590 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!noc.near.net!gateway!miki!oj
  3. From: oj@miki.pictel.com (Oliver Jones)
  4. Subject: Re: Help with Colormaps
  5. Message-ID: <1992Dec28.223524.2589@miki.pictel.com>
  6. Organization: PictureTel Corporation
  7. References: <7320055@hpfcso.FC.HP.COM> <stefans.725095561@bauv106> <judith-231292100556@mollusk.larc.nasa.gov>
  8. Date: Mon, 28 Dec 1992 22:35:24 GMT
  9. Lines: 32
  10.  
  11. In article <judith-231292100556@mollusk.larc.nasa.gov> judith@mermaid.larc.nasa.gov (Judith Moore) writes:
  12.  
  13. >       ....
  14. >    XSetWindowColormap (theDisplay, mainWindow, grayMap);
  15. >    XFlush (theDisplay);
  16. >    sleep (5);
  17.  
  18. If you don't mind violating the ICCCM (and you can convince your users
  19. that it's OK to do so) try calling
  20.  
  21.         XInstallColormap (theDisplay, grayMap);
  22.  
  23. right before your XFlush call.  This will take your special colormap
  24. and jam it into the frame buffer's hardware.
  25.  
  26. To get this to work well in a system-wide context you may wish to fool
  27. around with ColormapNotify events, and you may wish to explicitly
  28. uninstall your colormap when the user moves the pointer out of your
  29. window or some such.
  30.  
  31. Ordinarily, the window manager handles this for you according the the
  32. colorFocusPolicy and so forth.  But, if you want to colormap-animate
  33. you may need to be unconventional.  The penalty is that other
  34. applications may "go technicolor" or "go gray" in a way that users
  35. feel they can't control.  You may also incur some maintenance and QA
  36. headaches.
  37.  
  38. (In case anybody wants to flame me for suggesting that an application
  39.  call XInstallColormap directly, please consider saving the bandwidth
  40.  instead.  I know it's a violation.
  41.  Rule No. 1:  any rule may be broken for a good and documented reason.)
  42.  
  43.