Subject: Re: bug#70038: 29.3.50; Shift up/down in buffer with images on M-x other-window with some fonts

From: Rahguzar <[email-masked]>
Date: Thu, 28 Mar 2024 08:52:21 +0100

Hi Eli,

Eli Zaretskii <[email-masked]> writes:

> Crystal ball says that this happens because when a frame loses focus,
> we redraw the cursor as a hollow rectangle, and (for boring technical
> reasons, which I can explain if someone wants to know) that hollow
> cursor can have a different height than the block cursor we draw on a
> selected frame.  You can verify this guess of mine if you customize
> cursor-type to one of the non-default values -- the problem should go
> away for any cursor-type but the default one.
>
> If my guess is correct, fixing this is not easy (but patches are
> welcome, of course), and at the time I decided to leave this rare case
> be.

The original problem where we encountered this the cursor wasn't shown
at all. So I think this might be different. I have been unable to
reproduce it on my machine (it might be because pgtk build doesn't have
this problem) but from what I can tell the problem is that when the
window is not selected the vscroll gets reset to 0 and trying to set it
again seems to have no effect.

In the minimal reproducer there is a pre-redisplay-function that always
sets vscroll for the window to 200. When the window is deselected, the
function runs and Ramon checked by inserting a message that the vscroll
gets reported to be non-zero however the window gets drawn as if the
vscroll was 0. On selecting the window again, it gets redrawn with the
expected value of rescroll and this causes the jumps.

Rahguzar