Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: problem with colormaps. Message-ID: <8911180632.AA11418@Larry.McRCIM.McGill.EDU> Date: 18 Nov 89 06:32:23 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 47 > I am running X11R3 on a sun3/60 usin awm. > I have been fighting with a colormap problem for about a week. This > is a program which [uses color, but isn't seeing colors on the > screen]. Your problem is that you're being a good client. Now that I have your attention.... You are doing the correct thing and calling XSetWindowColormap. However, awm is not being a good window manager; it's ignoring the window colormaps [%]. If you had done the wrong thing and called XInstallColormap directly, it would have worked for you (in that you would have seen your colors on the screen - I hesitate to imply that doing this would make it completely working, because it would be non-colormap-compliant in the ICCCM sense). [%] I feel sure of this because I tried it here and it did this. You have only a few choices. Here are the ones that come to mind. 1) Switch to a colormap-compliant window manager. 2) Call XInstallColormap yourself and accept that this is not correct and will not work right when you eventually do use a compliant window manager (or someone else runs your program under one). 3) Allocate the colors out of the default colormap. 4) Put up with getting the wrong colors. I assume we can ignore option 4. Option 1 is the best solution, but presumably you use awm because either there's no choice or you like it, and in either case switching is undesirable. Option 3 is reasonable if you don't need very many colors, but from your description of the program you need lots. Option 2 is acceptable, particularly if you put it under the control of something user-configurable (command-line option, resource database flag, something like that) and make the default be the compliant behavior (what you have now). I've chosen a mix of 1 and 2. I made my window manager handle window colormaps properly, but I've also added an option to the program I had which turned up this problem to make it install the map itself, for others' use. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu