rws@EXPO.LCS.MIT.EDU (08/14/89)
Is there a way to find out the the number of cells that are unused in the default colormap? No good way. (And for some visuals, you'd need more than one number.) But I thought the point of using the default map was to allow sharing between clients. It is. I assume that means that more than one program could use the same map Yes so that keeping track of the number of colors that your program used so far wouldn't be sufficient information. Right. You have to pay attention to errors in the allocation requests, and react appropriately. One method is to allocate out of the default map until some allocation fails, then use CopyColormapAndFree to move your existing allocations into a new map and continue with the remaining allocations.
KEMPLER%LISAVX@COOPER.BBN.COM (08/14/89)
I've been doing some work with colormaps in XLIB. Is there a way to find out the the number of cells that are unused in the default colormap? I believe the XGetVisualInfo and XDisplayCells will tell you how many there were originally. But I thought the point of using the default map was to allow sharing between clients. I assume that means that more than one program could use the same map so that keeping track of the number of colors that your program used so far wouldn't be sufficient information. Any ideas on this would be helpful. Thanks. Lisa Kempler