Valdis.Kletnieks(a)vt.edu wrote:
> (set-glyph-image gc-pointer-glyph
"recycle2.xpm"))
>
> This worked great for, well years. However, I noticed recently that I
> no longer get the recycle icon, I get a text message instead. If I use
> the "recycle2.xpm" icon instead, I get an icon but it is black, not
> green.
I'm seeing this as well, but haven't tracked it down as of yet.
My top contender for why it's screwed up:
1) If you're using a 16-bit visual, you could be running out of colormap
entries or similar - at least on my box, the default visual looks like this:
default visual id: 0x23
visual:
visual id: 0x23
class: TrueColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0xf800, 0x7e0, 0x1f
significant bits in color specification: 8 bits
Note that the green mask is 6 bits, but only 5 bits are available in
the colormap subfield - so it's possible to run out (I think). Depending
on window manager, and background images, your colormap may be running out.
I never really understood the semantics of how XAllocColor() is supposed to
work on a TrueColor visual in conjunction with colormaps, so....
I'm pretty sure that XAllocColor() just returns the closest colour on
"fixed" visuals (StaticGray, StaticColor, TrueColor). It only actually
"allocates" anything on visuals which have some form of programmable
look-up table (GrayScale, PseudoColor, DirectColor).
DirectColor is the case where I never managed to understand the
semantics of XAllocColor(). I'm not sure that anyone else does either;
every piece of code which I could find simply created a private
colourmap and initialised it to a ramp using XStoreColor().
--
Glynn Clements <glynn.clements(a)virgin.net>