[comp.windows.x] Proper way to install a colormap...

battle@alphard.cs.utk.edu (David Battle) (01/10/90)

This should probably go on a frequently asked questions list, but one more
time...  What is the proper way to install a colormap so that (an ICCCM
compliant?) window manager such as twm will honor the request.  I would
like for the colormap to be installed when the cursor is in a particular
window, execpt possibly when the keyboard focus is elsewhere.

						-David L. Battle
						 battle@battle.esd.ornl.gov
						 battle@utkux1.utk.edu

dshr@SUN.COM (David Rosenthal) (01/10/90)

> This should probably go on a frequently asked questions list, but one more
> time...  What is the proper way to install a colormap so that (an ICCCM
> compliant?) window manager such as twm will honor the request.  I would
> like for the colormap to be installed when the cursor is in a particular
> window, execpt possibly when the keyboard focus is elsewhere.
> 
As usual,  the answer to frequently asked questions is RTFM.  In this case
the FM is the ICCCM,  sections 4.1.2.8 and 4.1.8.  In brief:

-	Clients whose top-level window and its subwindows all use the
	same colormap should set the colormap attribute of the top-level
	window.  The WM will track any changes,  and will ensure that this
	colormap is installed whenever the client has the colormap focus.

-	Top-level windows with subwindows or override-redirect popups that
	have different colormaps should have a WM_COLORMAP_WINDOWS property
	with a priority-ordered list of the windows whose colormaps should
	be installed.

Its kind of difficult to imagine how we could make it clearer to someone
who knows that the question relates to the ICCCM than to label the relevant
section "Colormaps".  There are a lot of complaints about the s/n ratio
on xpert.  Frequently asking questions that indicate that you can't
even be bothered to consult the contents page of the manual is a sure way
of overloading this communication channel to the point at which the people
who know the answers no longer listen to it.

	David.

marbru@auto-trol.UUCP (Martin Brunecky) (01/11/90)

In article <9001100130.AA00579@devnull.sun.com> dshr@SUN.COM (David Rosenthal) writes:
>As usual,  the answer to frequently asked questions is RTFM.  In this case
>the FM is the ICCCM,  sections 4.1.2.8 and 4.1.8.  In brief:
... explanation deleted...
>.... Frequently asking questions that indicate that you can't
>even be bothered to consult the contents page of the manual is a sure way
>of overloading this communication channel to the point at which the people
>who know the answers no longer listen to it.
>
>	David.

     I agree, BUT. Much  of the confusion is coming from the fact that MOST
     of the available Window managers do NOT work according to ICCCM rules.
     For example, neither Motif mwm nor DECwindows dwm (both Unix and VMS),
     nor (old versions of) twm handle the second case, i.e.
     sub-windows with different colormap than the top(shell), no matter
     how much time you spent on WM_COLORMAP_WINDOWS property.
     To my knowledge, only OpenWindows wm and Solbourne Tom's wm do handle
     WM_COLORMAP_WINDOWS right ( I'dont have R4 yet ).

     So, don't blame people for not reading ICCCM. The explanation in there
     and understanding of the state-of-the-X limitations is clear to Xperts,
     but I doubt Joe xxx has any chance of success in this area.

-- 
###############################################################################
Martin Brunecky, Auto-trol Technology Corporation,
12500 North Washington Street, Denver, CO-80241-2404
(303) 252-2499                                        ncar!ico!auto-trol!marbru