Subject: 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, 27 Sep 2021 14:52:54 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sun, 26 Sep 2021 17:56:03 +0800
> 
> > First, which call to display_and_set_cursor are we talking about?
> 
> The call inside show_mouse_face.
> 
> > And what do you mean by "erase_phys_cursor gets very confused" --
> > confused how?
> 
> It calls draw_phys_cursor_glyph, which draws the glyph at the original X
> position, and not the position with the mouse face offset applied.
> 
> What I was asking is whether or not it's okay to not restore
> phys_cursor->x to its original value after the call to
> display_and_set_cursor inside show_mouse_face, or if I should also
> calculate and add the offset in erase_phys_cursor (if
> cursor_in_mouse_face_p) instead.

I think I'm still a bit confused.  Can you show the patch you have
where you see these problems with erase_phys_cursor?

P.S. And sorry for the delay in answering.