emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font-lock.el uses strange value for min-colors (Was x-display-color-


From: Jan D.
Subject: Re: Font-lock.el uses strange value for min-colors (Was x-display-color-cells returns wrong number)
Date: Sun, 29 Feb 2004 20:27:56 +0100

However, this sounds like a tip of an iceberg: are you saying that
list-display-colors will display a list whose length has no simple
relation to what display-color-cells returns?  That sounds bad,
doesn't it?

Bad or not, it is the case. An X server is free to use just about any value
for DisplayCells, it is just the number of cells you get by default
when creating a colormap. In this case, Jesper Harder has 16 planes, but
just 64 color cells.  So he can actually display 65536 colors, not 64.
However, he also has a TrueColor visual, so Emacs should see this and
ignore DisplayCells, I don't know why it doesn't.  I see that
list-colors-display has code to ignore DisplayCells for TrueColor visuals.

It is actually uncommon for any X server to return more than 256 for
DisplayCells, presumably to save memory if a lot of colormaps are
allocated.

A better way to find out the number of colors that can be displayed
at the same time is (1 << DisplayPlanes(...)).  There is no need to
distinguish between visual types if number of colors is calculated this
way.

        Jan D.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]