[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: |
Manuel Giraud |
Subject: |
bug#67794: 30.0.50; mouse-face is not respected on SVG images |
Date: |
Tue, 12 Dec 2023 15:07:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
[...]
>> Now a 'C-s foobar' shows the matched string respecting the isearch face
>> even on the SVG image. But when, you move your mouse over the "foobar"
>> string, the SVG image keeps the foreground and background of the default
>> face.
>
> I think we only support colors from 'face' properties on SVG images,
> not from 'mouse-face'. Alan, am I right?
>
> Basically, SVG images specify their own background color, and the
> Emacs display cannot override that, since the image is generated by
> librsvg. So to change the background color, we wrap the SVG in
> another SVG, see svg_load_image. This way, the SVG spec submitted to
> librsvg specifies different colors according to what Emacs wants. And
> we only do that for colors that come from 'face' properties.
This means that when you do a 'C-s foobar' and that the SVG is correctly
displayed with the isearch face (foreground and background), such an
embedded SVG was created on the fly? If so, I think we should do the
same for mouse-face too because this SVG generation is very fast!
>> (note: I have tried to track this down but debugging Emacs display is
>> *hard*. I have read and tried the "Debugging Emacs redisplay problems"
>> section of etc/DEBUG with no luck so far.)
>
> The mouse highlight is implemented in note_mouse_highlight and its
> subroutines. If you already discovered that, then what were the
> difficulties you faced in understanding what happens?
Yes, I used to put a break point on show_mouse_face but then diving down
to x_draw_glyph_string it is hard to "see" what is going on here. As it
was working with face such as isearch, my new strategy was to find out
how it worked here but now I don't know where/how to break to the
correct place.
--
Manuel Giraud
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/12
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/12
- bug#67794: 30.0.50; mouse-face is not respected on SVG images,
Manuel Giraud <=
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Alan Third, 2023/12/12
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/12
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/12
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/13
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/13
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/13
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/13
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/13
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/13
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/13