Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcdc!stroyan From: stroyan@hpfcdc.HP.COM (Mike Stroyan) Newsgroups: comp.sys.hp Subject: Re: X color maps and switching Message-ID: <5570251@hpfcdc.HP.COM> Date: 1 Aug 89 23:20:16 GMT References: <578@mmlai.UUCP> Organization: HP Ft. Collins, Co. Lines: 34 > I was using the new X Window Systems' ability to output starbase > to a window, when I stumbled onto a very interesting thing: When > the cursor enters the starbase window, the color maps change just > like I supposed they would. Unfortunately, the REST of the screen > turns a kind of reddish-orange extremely distracting hue. Unfortunately, this is a feature. If you are using a Starbase program, (or Xlib program), that changes all of the colors in its colormap, then the windows using other colormaps will not look correct. The X11 server is doing the best that it can to come up with more colors than it has resources to produce. It changes the hardware colormap settings to the values correct for the colormap focus window, and the colors in the other windows are forced to change as well. Since multiple windows may be meant work together with equivalent colormaps, the X11 server would be presumptuous to black out the rest of the windows when one window has its colormap installed. There are some ways to reduce impact of the colormap problem. - Use Starbase without the gopen(,,,INIT) flag and allocate colors using the Xlib calls. This will share the default colormap with other X11 clients. It doesn't work in a device independent way. - Use Starbase without the gopen(,,,INIT) flag and allocate colors using the Starbase rgb calls. This will share the installed colormap with other X11 clients. Later changes to the installed colormap will change the colors that were used by Starbase. - Use the xinitcolormap command in the front of .x11start to set up some of the colors in the default colormap to match the Starbase INIT colors. Then those colors will remain the same when a Starbase program's window has its colormap installed. Mike Stroyan, stroyan@hpfcla.hp.com