[comp.windows.x] How to clear the colormap dynamically

victoria@sbi.com (Victoria Drozdov) (11/05/90)

I have a few applications that allocate a lot of colors.
If xshowcmap is brought up, the color table looks
completely full.

When I try to bring up new applications that try to allocate
even more colors, I run into a problem... It seems like
the color cells cannot be reusable? Even when I close
the original applications that allocated all the colors,
I still cannot allocate any more!

Is there a way that I can dynamically clear the colormap?
Or is there a way that an application can clear the color
entries it was using?

I sure hope that I just don't understand something that's
happening and that the solution is simple.

Thanks in advance for your replies.

etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) (11/06/90)

 
When 2 or more applications have allocated the same entry in a colormap, that entry is not freed until all applications who use it have exited.  If that cell was allocated as a ReadOnly Cell (via XAllocColor), then no application may change it.  You may change the color of any non-allocated color using XStoreColor(s).
--
					Eric Taylor
					Baylor College of Medicine
					etaylor@wilkins.bmc.tmc.edu
					(713) 798-3776