KEMPLER@XVAX.BBN.COM (11/15/89)
Everyone - Please help clarify for me. I was reading the ICCCM about Colormaps (4.1.8). I'm trying to figure out what to do if I need more room for colormap entries than is available in the current colormap for a window. From the ICCCM (and other sources) it sounds like I'm supposed to do the following. 1. Use XCopyColormapAndFree: 2. Then if all of my windows and subwindow share colormaps, use XChangeWindowAttributes Otherwise, use XChangeProperties to set the colormap. Both of these notify the window manager about a colormap change. 3. Never use XInstallColormap. Leave that to the window manager. But what about XSetStandardColormap? What about XSetWindowColormap? Basically, is XChangeWindowAttributes/XChangeProperties sufficient to "install" the new colormap? Is there any way to request that a new colormap be installed for all of a client's windows without explicitly calling XChangeWindowAttributes for each window? Thanks for any info on this topic - Lisa
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (11/15/89)
From the ICCCM (and other sources) it sounds like I'm supposed to do the following. Right. But what about XSetStandardColormap? You can call this. What about XSetWindowColormap? This is just a convenience interface to XChangeWindowAttributes, it's fine. Is there any way to request that a new colormap be installed for all of a client's windows without explicitly calling XChangeWindowAttributes for each window? The theory is that most of the time you can do all of your colormap allocation before you actually create the windows, in which case you avoid having to run around and re-set all of your windows. If not, there are probably a fair number of systems under which just changing the colormap of your top-level window (and not using WM_COLORMAP_WINDOWS) will cause the right display effect, but it would be unwise to count on this behaviour. You should really make sure the colormap for each window is correct.