I've done lots of graphics programming, but am pretty new to Xlib. Right
now, I'm trying to figure out how the colormap works. I'm running on a SUN
X-term, so I have 8 color planes (256 max. colors :-( ).
According to my books, to find out how many *available* (read/write) colors
there are, you have to use XAllocColorCells in a binary search until you find
the largest number that returns a valid response. This seems to work okay
except for the following problems:
1) If I don't run anything that needs new colors, my code says 128 are free.
If I run "xv -quit" to put something in the background, XAllocColorCells
fails to find ANY free colors. I've looked through the xv source, and
it uses XAllocColorCells to allocate its colors so they SHOULD be read/
write. But even after the process is dead and gone, I can't get to them
- but xv can!
2) I understand that the window manager uses a few colors for itself. But
on my machine, the first 70 or so seem to be unchangeable, even by xv!
Any clues? Thanks, Dave