[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: |
Mon, 18 Dec 2023 12:02:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
Regarding this feature, I came up with the following patch:
diff --git a/src/xdisp.c b/src/xdisp.c
index 75d769600c4..735200fdf65 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -30985,6 +30985,24 @@ draw_glyphs (struct window *w, int x, struct glyph_row
*row,
}
}
+ /* Update image glyphs with mouse face features. */
+ if (hl == DRAW_MOUSE_FACE)
+ {
+ Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
+ for (s = head; s; s = s->next)
+ if (s->first_glyph->type == IMAGE_GLYPH)
+ if (s->img)
+ {
+ /* 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);
+ }
+ }
+
/* Draw all strings. */
for (s = head; s; s = s->next)
FRAME_RIF (f)->draw_glyph_string (s);
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?
--
Manuel Giraud
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, (continued)
- 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/14
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/14
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/14
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/14
- 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/18
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/18
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Alan Third, 2023/12/18
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/19
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/19
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/19
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/19
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/19
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Eli Zaretskii, 2023/12/19
- bug#67794: 30.0.50; mouse-face is not respected on SVG images, Manuel Giraud, 2023/12/19