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

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

bug#67794: 30.0.50; mouse-face is not respected on SVG images


From: Alan Third
Subject: bug#67794: 30.0.50; mouse-face is not respected on SVG images
Date: Mon, 18 Dec 2023 11:42:21 +0000

On Mon, Dec 18, 2023 at 12:02:22PM +0100, Manuel Giraud via Bug reports for GNU 
Emacs, the Swiss army knife of text editors wrote:
> +           /* Alter the spec a bit to have a different hash for the
> +              image cache.  */
> +           ptrdiff_t id;
> +           Lisp_Object spec = Fcopy_sequence (s->img->spec);
> +           spec = nconc2 (spec, list2 (intern (":highlight"), Qt));
> +           id = lookup_image (f, spec, hlinfo->mouse_face_face_id);
> +           s->img = IMAGE_FROM_ID (f, id);

You shouldn't have to change the image spec as the image cache
differentiates by colour too. So if the mouse face has the same
colours as the default face it will use the same image, but if they're
different it will create a new image.

If that's not happening then there must be a bug somewhere.

> It does something on the an image glyph when it is hover but the image
> is completely messed up.  I have stepped this code down to
> svg_load_image but I do not understand what went wrong.  Any ideas?

The code looks OK to me. In what way is the image messed up? I'm not
sure how to test mouse face on my machine, is there a built-in theme
that uses it?
-- 
Alan Third





reply via email to

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