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
Message #104 received at 50660 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 21 Sep 2021 13:17:58 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: larsi <at> gnus.org, 50660 <at> debbugs.gnu.org
>
> > From: Po Lu <luangruo <at> yahoo.com>
> > Cc: larsi <at> gnus.org, 50660 <at> debbugs.gnu.org
> > Date: Tue, 21 Sep 2021 17:45:37 +0800
> >
> > So even if I move the cursor into the middle of the box, it will
> > still be in the wrong location, but when the cursor is moved,
> > show_mouse_face is not called, so I think putting the correction is
> > show_mouse_face is not the solution to this problem.
>
> We could identify this situation and call show_mouse_face forcibly,
> e.g. in gui_update_window_end or some such place.
Here's a specific idea: add the same code which fixes the cursor
position into gui_update_window_end, before display_and_set_cursor is
called, here:
if (!w->pseudo_window_p)
{
block_input ();
if (cursor_on_p)
display_and_set_cursor (w, true,
w->output_cursor.hpos, w->output_cursor.vpos,
w->output_cursor.x, w->output_cursor.y);
if (draw_window_fringes (w, true))
{
if (WINDOW_RIGHT_DIVIDER_WIDTH (w))
gui_draw_right_divider (w);
else
gui_draw_vertical_border (w);
}
unblock_input ();
}
This is always called when the display is updated, even if we just
move the cursor. By looking at the value of cursor_in_mouse_face_p,
we can determine whether the fix is needed, and apply it before
calling display_and_set_cursor. (We will need to fix w->phys_cursor.x
after the call to display_and_set_cursor returns, because it records
there the value passed as the 5th argument.)
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.