Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!lll-winken!uunet!tektronix!orca!tekecs!bobtl From: bobtl@tekecs.GWD.TEK.COM (Bob Toole) Newsgroups: comp.windows.x Subject: Re: widget with colormap Message-ID: <11207@tekecs.GWD.TEK.COM> Date: 29 Mar 89 16:36:27 GMT References: <8903281206.AA23640@faraday.ece.cmu.edu> Reply-To: bobtl@tekecs.GWD.TEK.COM (Bob Toole) Organization: Tektronix, Inc., Wilsonville, OR Lines: 23 In article <8903281206.AA23640@faraday.ece.cmu.edu> Dan.Nydick@FARADAY.ECE.CMU.EDU writes: > 1) Did I miss the "right" way of doing this? (ie: should > my widget really be calling XInstallColormap?) I think this is a mistake. I've done a lot of work fiddling with colormaps. What I have to do is build my own colormap and set the shell widget to use my colormap. The sequence is important here. First the XtInitialize to open the display, then build my colormap(s). Set the colormap of the widget, now realize the widget. I use a variant of awm which installs the colormap nicely. I believe vanilla awm should do the same thing. Awm at least is intelligent enough to use the colormap of the window it is reparenting. I also put a switch in my programs so that they can install/deinstall colormaps, but only as a last resort. This is only for when there is no window manager or a non-compliant window manager. I leave it up to the user as to when to use the switch. It will be nice when that can go away completely. Bob Toole bobtl@tekecs.GWD.TEK.COM