summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-10-14 18:38:26 +0800
committerEli Zaretskii <eliz@gnu.org>2021-10-17 14:46:55 +0300
commit2028df7826bb2c2909b2aaeba47282ca70c514e3 (patch)
tree3927400069c36a3825feadeabd33d82e20c87a0b /src/w32term.c
parent5a5651a2f927b7758dfdf36953073f1f1a9920f9 (diff)
downloademacs-2028df7826bb2c2909b2aaeba47282ca70c514e3.tar.gz
emacs-2028df7826bb2c2909b2aaeba47282ca70c514e3.tar.bz2
emacs-2028df7826bb2c2909b2aaeba47282ca70c514e3.zip
Fix minor issues with text display when cursor is in mouse face
* src/xdisp.c (get_cursor_offset_for_mouse_face): Don't calculate offsets for the glyph the cursor is on, and move some logic to get_glyph_pixel_width_delta_for_mouse_face. (fill_composite_glyph_string) (fill_gstring_glyph_string) (fill_glyphless_glyph_string) (fill_glyph_string) (fill_image_glyph_string) (fill_xwidget_glyph_string) (fill_stretch_glyph_string): Set s->face to mouse face whenever appropriate. (get_glyph_pixel_width_delta_for_mouse_face): New function. (set_glyph_string_background_width): Update background width and s->width to take into account differing :box properties of the mouse face, when producing strings for the cursor. (erase_phys_cursor): Redraw mouse face when erasing a cursor on top of the mouse face. * src/xterm.c (x_set_mouse_face_gc): Stop setting s->face when under mouse face because redisplay now does that for us. * src/w32term.c (w32_set_mouse_face_gc): Likewise.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 9cf250cd73f..07a5cd35649 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -954,22 +954,6 @@ w32_set_cursor_gc (struct glyph_string *s)
static void
w32_set_mouse_face_gc (struct glyph_string *s)
{
- int face_id;
- struct face *face;
-
- /* What face has to be used last for the mouse face? */
- face_id = MOUSE_HL_INFO (s->f)->mouse_face_face_id;
- face = FACE_FROM_ID_OR_NULL (s->f, face_id);
- if (face == NULL)
- face = FACE_FROM_ID (s->f, MOUSE_FACE_ID);
-
- if (s->first_glyph->type == CHAR_GLYPH)
- face_id = FACE_FOR_CHAR (s->f, face, s->first_glyph->u.ch, -1, Qnil);
- else
- face_id = FACE_FOR_CHAR (s->f, face, 0, -1, Qnil);
- s->face = FACE_FROM_ID (s->f, face_id);
- prepare_face_for_display (s->f, s->face);
-
/* If font in this face is same as S->font, use it. */
if (s->font == s->face->font)
s->gc = s->face->gc;