Subject: Re: bug#50660: 28.0.50; Text artifacting when the cursor moves over text under mouse face that originally displayed a box

From: Eli Zaretskii <[email-masked]>
Date: Mon, 20 Sep 2021 15:07:43 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Mon, 20 Sep 2021 19:08:13 +0800
> 
> > Specifically, I now think the adjustment should happen in this
> > fragment from show_mouse_face, before we call display_and_set_cursor:
> 
> Thanks, but I already cooked something up.  The adjustment, in my case,
> is done in draw_phys_cursor_glyph, conditional on
> cursor_in_mouse_face_p.
> 
> Is there anything wrong with this approach?  Thanks.

My worry is that draw_phys_cursor_glyph is called from many other
places as well, none of which needs this adjustment.  So we are going
to do unnecessary work, especially if the cursor happens to be inside
mouse-highlight.