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