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

  1. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
  2. From: oj@miki.pictel.com (Oliver Jones)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: Help with Colormaps
  5. Message-ID: <1992Dec29.042919.24806@sm.sony.co.jp>
  6. Date: 29 Dec 92 04:29:19 GMT
  7. Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
  8. Distribution: fj
  9. Organization: PictureTel Corporation
  10. Lines: 37
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: 28 Dec 92 22:35:24 GMT
  14. Message-Id: <1992Dec28.223524.2589@miki.pictel.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.  
  21. >       ....
  22. >    XSetWindowColormap (theDisplay, mainWindow, grayMap);
  23. >    XFlush (theDisplay);
  24. >    sleep (5);
  25.  
  26. If you don't mind violating the ICCCM (and you can convince your users
  27. that it's OK to do so) try calling
  28.  
  29.         XInstallColormap (theDisplay, grayMap);
  30.  
  31. right before your XFlush call.  This will take your special colormap
  32. and jam it into the frame buffer's hardware.
  33.  
  34. To get this to work well in a system-wide context you may wish to fool
  35. around with ColormapNotify events, and you may wish to explicitly
  36. uninstall your colormap when the user moves the pointer out of your
  37. window or some such.
  38.  
  39. Ordinarily, the window manager handles this for you according the the
  40. colorFocusPolicy and so forth.  But, if you want to colormap-animate
  41. you may need to be unconventional.  The penalty is that other
  42. applications may "go technicolor" or "go gray" in a way that users
  43. feel they can't control.  You may also incur some maintenance and QA
  44. headaches.
  45.  
  46. (In case anybody wants to flame me for suggesting that an application
  47.  call XInstallColormap directly, please consider saving the bandwidth
  48.  instead.  I know it's a violation.
  49.  Rule No. 1:  any rule may be broken for a good and documented reason.)
  50.