naughton@wind.eng.sun.COM (Patrick Naughton) (04/11/90)
>> montanaro@crdgw1.ge.com (Skip Montanaro) writes: >> >> Running xlock under X11R4/twm produces the following error message from twm: >> /usr/bin/X11/twm: client illegally changed colormap (i = 0, j = -1 >> ... He does the obvious thing, removes the XInstallColormap() from xlock.c and adds the colormap as a window attribute on the main xlock window. >> ... >> While this gets rid of the twm error message, the colormap is still not >> installed. The ICCCM explicitly states that no client should install a colormap using XInstallColormap(). The prescribed method of getting a colormap installed is to (as you indicate) set the window.colormap attribute and let the ICCCM window manager install it for you. The ICCCM also explicitly states that override-redirect windows are excluded from window manager intervention. Thus: If you want to have a private colormap on an override-redirect window, you HAVE TO INSTALL IT YOURSELF! This implies that twm is taking the letter of the ICCCM and enforcing it in asserting that no client should install a colormap. I believe the next revision of the ICCCM should have a clause in it about this, which states: "Most clients which need private colormaps should use the window.colormap attribute and let the window manager handle the colormap installation policy. There may be some special case clients which need to install colormaps explicitly on behalf of override-redirect windows. This case should be unimpeded by ICCCM compliant window managers." Here's the diffs for twm to let it complain to stderr, but leave the colormap installed. *** /tmp/events.c.orig Tue Apr 10 10:55:15 1990 --- /tmp/events.c Tue Apr 10 10:55:47 1990 *************** *** 425,431 **** fprintf (stderr, "%s: client illegally changed colormap (i = %d, j = %d\n", ProgramName, i, j); - InstallWindowColormaps(ColormapNotify, (TwmWindow *) NULL); } } } --- 425,430 ---- -Patrick ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080