On Thu, Jul 18, 2002 at 11:07:51AM +0100, Tim Phipps wrote:
> >
> >
> >But, when I run my Xserver with depth
> >8 (and fvwm allocate these 216 colors) I *cannot* reproduce any
> >problems, I can run netscape, xv, gimp, any gtk/gnome apps, any
> >kde apps ..etc without any problems.
> >
> You may be being helped by your graphics card/Xserver. If your setup 
> allows other colormaps to be active without deactivating the root 
> colormap then it could be that netscape etc have allocated a private 
> colormap and you don't notice. Other people on less advanced hardware will.
>

What it seems to happen is that, under depth 8, XFree (or at least the
2 Xserver that I can run on my laptop) allocate a color table at
startup of 244 colors. So there are only 12 free colors in the
colormap. This seems very few, but it seems to me that this is a very
reasonable way to implement sharded colors: there is no reason for a
client to take all the colors for itself and the X server decides for
all the clients almost all the colors.

I think that I've no problems with netscape et al. probably because
either the XFree color table is good or the apps take in account
XAllocColor failure in the good way (also, fortunately, the 216 colors
table that fvwm gives to me is a subset of the XFree table).

I am curious about what the others X implementation do.
 
> It could be that your apps are sophisticated enough to cope with low 
> availability of colors. There are plenty of ancient CAD applications 
> around that fall over in a big heap if they don't get every color they 
> ask for.
> 

There are not only these old apps and Framemaker ... there are also
fvwm. I can have color allocation failure (and so noisy black)
colors with a config file which use very few colors.

> >The old method reduce colors in the good way only for xpm.  Now I
> >think we need to reduce colors for png, tinting and gradient.
> >Moreover, the most important thing concerning colors with a
> >pseudo color visual is that color allocation MUST never fail. I
> >do not see an other method that this color table method.
> > 
> >
> Instead of allocating colors you can query the colormap and find a close 
> match to the one you want and just use it. I'm not sure if it's possible 
> to find out if  a color cell is allocated to another client or not so it 
> may be that picking color cells like this leaves you exposed to the 
> color of the cell changing. Maybe allocing the color of the cell (rather 
> than the original color) would fix the cell color.
>

Yes, I think that this should work. But I do not think that this solve
the pbs I see with color limitation.

Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to