Hrvoje Niksic wrote:
Didier, if you're working on this, you might want to fix the
code.
Imagine the default face having a background pixmap. Say face A
exists and specifies its own background color. The color prevails
over the background inherited from default, which is good. But now
imagine a face B which inherits from face A (and specifies something
inconsequential, such as its foreground color.) You would expect the
face B to display exactly as the face A, except for the different
foreground color?
What happens is that face B gets displayed incorrectly, because the
MAYBE_UNFROB_BACKGROUND_PIXMAP sees that B doesn't specify its own
background color and concludes that the inherited background pixmap
should win.
This is actually *not* what happens. What happens is that the image
instantiator uses fallbacks in the case of face inheritance. Taking again your
example, here's what happens:
- We try to instantiate the background pixmap of the 'modeline-mousable face.
- It "inherits" from the 'modeline face, so we try to instantiate that one.
- It is unspecified, so we use the fallback, which returns the 'default face
specification.
As a consequence, the code related to the face cache management *is* correct:
the cache for 'modeline-mousable indeed contains a real specification for the
background-pixmap, so it wins.
I'll send a fix for this on xemacs-patches@.
BTW, this reminds me of something a bit annoying:
if you do ... (set-face-background-pixmap face pixmap)
and later ... (set-face-background face color)
you would expect to remove actually the pixmap, wouldn't you (I would :-) ?
--
/ / _ _ Didier Verna
http://www.inf.enst.fr/~verna/
- / / - / / /_/ / EPITA / LRDE mailto:didier@lrde.epita.fr
/_/ / /_/ / /__ / 14-16 rue Voltaire Tel. +33 (1) 53 14 59 47
94276 Kremlin-Bicêtre cedex Fax. +33 (1) 44 08 01 99