Subject: bug#58980: 29.0.50; Mouse wheel scroll twitches up sometimes when I scroll down

From: Po Lu <[email-masked]>
Date: Thu, 03 Nov 2022 19:07:23 +0800

Mickey Petersen <[email-masked]> writes:

> I _do_, however, have a way that seems to reproduce the issue: when I
> scroll an inactive window and then go back to scrolling the active
> window the bug manifests itself more easily:
>
> 1. Ensure there are two windows minimum.

Windows, or frames?

> Seems there's some stateful behaviour that does or does not get
> carried over when the 'hovered window scroll' changes?

No, that shouldn't be it.  Emacs tracks scroll valuators on a
display-local basis, but only gets motion events for the valuator when
the mouse pointer is inside a frame.  As a result, scroll valuators are
reset upon crossing events, as by the time an XI_Enter event arrives,
the stored value can no longer be trusted.

So please answer the question above.