Xref: utzoo comp.windows.x:24471 comp.windows.x.motif:94 Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!mit-eddie!snorkelwacker!usc!zaphod.mps.ohio-state.edu!mips!smsc.sony.com!dce From: dce@smsc.sony.com (David Elliott) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: Re: Colormaps Message-ID: <1990Jul16.134303.2465@smsc.sony.com> Date: 16 Jul 90 13:43:03 GMT References: <1990Jul13.183517.23734@media.uucp> <59@maxx.UUCP> Reply-To: dce@Sony.COM (David Elliott) Organization: Sony Microsystems Corp. Lines: 33 In article <59@maxx.UUCP> tyager@maxx.UUCP (Tom Yager) writes: >If you use XSetWindowColormap() to install the colormap, and mwm's >colormapFocusPolicy resource is set to "keyboard," then that window's map >should be active whenever it has input focus. When you shift focus away from >that window, the default colormap (and, therefore, mwm's shading) should be >restored. Is that not sufficient? I think that the question came up because it isn't acceptable. In general, I feel that just blindly installing a new colormap makes people less likely to want to use your application. When the application with the new colormap gets focus, the window manager colors get messed up, and focus changes can be very annoying because colors are changing everywhere. Also, the application in question is doing colormap animation, and if the cells used for animation are the same ones used for drawing window manager window borders or icons, the screen can go ape. A good example of installing a colormap that isn't obtrusive can be found in xcycle. This program allocates a new colormap, but uses cells starting at number 255 instead of 0, and thus almost never uses cells that are already being used, even with full-color root backgrounds. The only complaint I have about xcycle is that you can't tell it not to allocate a new colormap. Sometimes, you just want to use the cells. The algorithm given by der Mouse is probably the best way to go, with the additional user-option to use the default colormap if it's large enough. -- ...David Elliott ...dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce ...(408)944-4073 ..."You know my motto: Forgive and uh... the other thing."