🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36735

Re: ICCCM and colormaps---simple question

#36735
From: der Mouse
Date: Tue, 13 Feb 1990 03:34
31 lines
1786 bytes
> Here's my question: According to the ICCCM, the toplevel window of an
> application should set it's colormap, but not *install* it, since the
> windowmanager will do that.

More precisely, it's the window manager's job to do that if-&-when its
policy says it should be done.  Nothing says it will ever actually
happen.

> However, if there's no window manager running, will the colormap
> still get installed by, say, the server?

Almost certainly not (though as I understand it, the server would be
free to use anything it likes as the colormap if the required list is
empty, which I believe it will be when nobdy has called
XInstallColormap yet).

> If not, what's the simplest way to be able to handle the no
> windowmanager case, and yet be ICCCM-compatible?

What I recommend (and use in my programs) is to provide an option the
user can use which means that there's no window manager running (or at
least if there is it doesn't handle window colormaps correctly), and
that the program should call XInstallColormap and XUninstallColormap
itself at appropriate times (typically on EnterNotify and LeaveNotify
events).  There are doubtless other reasonable approaches; I don't
suppose it really makes much difference which one you pick.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu
Technical Details
Message-ID: <9002130334.AA11409@Larry.McRCIM.McGill.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse
From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse)
Newsgroups: comp.windows.x
Subject: Re:  ICCCM and colormaps---simple question
Message-ID: <9002130334.AA11409@Larry.McRCIM.McGill.EDU>
Date: 13 Feb 90 03:34:42 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 31