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: Thu, 14 Oct 2021 18:51:04 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Thu, 14 Oct 2021 21:11:31 +0800
> 
> Thanks for the clarifications.  One last question though, if I make the
> change to setting the face in draw_glyphs, it would be OK to remove
> x_set_mouse_face_gc, because the face is already set correctly by
> draw_glyphs, and no other adjustments to the GC or glyph string will be
> required, right?

No, I think it's wrong to set the face GC in xdisp.c, because the GC
is fundamentally terminal-specific, so it belongs to xterm/w32term
etc.  I'm not even sure xdisp.c knows the exact type of GC, which
differs according to the platform.  The logic of selecting the face
should indeed be removed from x_set_mouse_face_gc, but the calls to
XChangeGC etc. should remain there.