PseudoColor and error with XAllocColorCells()

Harold L Hunt II huntharo@msu.edu
Tue May 27 14:46:00 GMT 2003


Céline,

celine.renard@actemium.com wrote:
> Hello,
> 
> I test a software developped on Unix/Linux. This soft is a client of X
> server.
> So, I want to test the server Cygwin/XWin on  Windows NT4. (Actually, we
> have Exceed, and all is OK)
> This soft needs to allocate 72 colors and these colors must be writable.
> So, the X server must be in PseudoColor
> To do that, I put in the file startxwin.bat : start XWin -fullscreen -depth
> 8
> The xdpyinfo returns :
>      1 visual
>      class is PseudoColor
>      depth is 8 planes
>      available colormap entries is 256
> 
> And I run my program on Unix platform and the display is my PC NT4
> I cant allocate my 72 colors with the function XAllocColorCells()
> I can only allocate 6 colors with this function.
> Can anybody help me and  tell me why ?

Did you write this software yourself?  What you probably want to do is 
create your own color map first, then alloc the colors in that new 
colormap.  It sounds like you are trying to alloc the colors in the 
default colormap, which have already been allocated.

I'm not really an X Client developer, so I must ask the other folks: Is 
it even possible to create a private colormap?  I assume that it is, 
because I had to implement the code to switch between colormaps when 
clients specified that they used a non-default colormap.

Harold



More information about the Cygwin-xfree mailing list