GNU bug report logs -
#50660
28.0.50; Text artifacting when the cursor moves over text under mouse face that originally displayed a box
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Sat, 18 Sep 2021 12:24:01 UTC
Severity: normal
Found in version 28.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
> So I think all that's needed is to adjust the value of
> w->phys_cursor.x, when needed, in draw_phys_cursor_glyph, before
> passing it to draw_glyphs, or perhaps in its callers. The value of
> w->phys_cursor.x should stay unaltered, but what we pass to
> draw_glyphs should be offset if needed.
Thanks, I'll work on that.
> The glyph row doesn't store any dimensions, it only stores the
> pixel_width of each glyph and the starting X-coordinate of the row.
> So where the mouse face is drawn, we don't need any updating.
> The cursor position of a window, stored in w->phys_cursor, is
> calculated when the cursor is moved. It is never recalculated
> thereafter, until point is moved again. In particular, displaying
> mouse-sensitive text in mouse-face just reuses the glyphs already
> produced, it doesn't recalculate them. But since we always redraw the
> entire sequence of glyphs in the mouse face or in the box face, the
> glyphs gets moved horizontally because we see the first glyph with the
> box and handle that accordingly. But when we then redraw the cursor,
> we reuse the information in w->phys_cursor, which is slightly off when
> the box attributes of the mouse face is different from that of the
> "regular" face. This is what causes the cursor glyph be drawn in the
> wrong location.
> The correct place to fix this is therefore somewhere under
> note_mouse_highlight, which is where we handle redrawing of the
> mouse-sensitive face, including the cursor.
Thanks, I've learned a lot. I hope I haven't been inconveniencing you
in any way.
This bug report was last modified 3 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.