Subject: bug#35246: 26.2; Mouse wheel scrolling in GTK build sometimes scrolls the entire buffer

From: Alex Gramiak <[email-masked]>
Date: Mon, 15 Apr 2019 14:00:37 -0600

I just got another issue, and this time:

1) Busy cursor briefly appeared after several seconds of a
non-responsive Emacs.

2) Scrolling occurred right after with a seemingly normal scrolling
distance.

This time I got a clean C-h l since I just saved a buffer beforehand:

   <help-echo> <help-echo> <down-mouse-5> <mouse-5> [mwheel-scroll]
   <double-down-mouse-5> <double-mouse-5> [mwheel-scroll]
   <down-mouse-5> <mouse-5> [mwheel-scroll]
   <double-down-mouse-5> <double-mouse-5> [mwheel-scroll]
   <help-echo> <help-echo> <help-echo> <help-echo> <down-mouse-5> <mouse-5>
   [mwheel-scroll]
   <double-down-mouse-5> <double-mouse-5> [mwheel-scroll]
   C-h l [view-lossage]

FWIW I don't see the <help-echo> prefixes when scrolling normally.

Eli Zaretskii <[email-masked]> writes:

>> From: Alex Gramiak <[email-masked]>
>> Cc: [email-masked]
>> Date: Mon, 15 Apr 2019 11:10:30 -0600
>> 
>> > The question is where did those events come from?  Is it possible that
>> > something is wrong with your mouse wheel or the driver?
>> 
>> I'd be surprised, since Emacs is the only program that I've seen this
>> occur in. I scroll a fair bit with the mouse wheel in Firefox and have
>> never seen this there.
>
> So you did actually scroll the wheel when this happened in Emacs, just
> not that much?  I thought these scroll events were unrelated to what
> you did at the time.  If you did use the mouse when that happened, can
> you describe what you did with it?

I did scroll the mouse wheel, but only a few notches worth (so maybe
1/4 of a page or so).

All I did with the mouse is click the Emacs taskbar item in my DE's
panel (if iconified), then move the pointer over a window and scroll a
small amount.

>> There may have been some scroll events that occurred before I refocused
>> the frame that wouldn't have close times, so it might be nice to
>> distinguish them.
>
> I don't understand: before you refocus the frame, the scroll events
> are not delivered to Emacs, they are delivered to the frame or window
> that has focus.  Right?

Right, but I was considering the following scenario:

1) I scroll around a buffer a bit, with the normal scrolling happening.
2) I unfocus the frame.
3) I do other tasks for a while.
4) I come back and attempt to scroll.

It would help determine _which_ of the scroll events started this issue.
In the case above, it's the one prefixed by <help-echo>. Still, this
might mean nothing, in which case displaying the time is indeed not
helpful for this problem.