Can I share colormaps across different frame buffers?
No. It is important to realise that if a machine has two frame buffers, then each will have a completely different colormap table. Thus, if a pixel value of 5 corresponds to green on the first frame buffer, there is no guarantee that 5 will correspond to green on the second. This can cause problems if an application intends to create windows on multiple screens and wants to use the same pixel values on each. One solution would be to attempt to allocate a large number of cells on each screen, and then only to use those cells which were common to both. Another solution would be to allocate a custom colormap on each screen and then to lock it using the techniques detailed above.