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 11:10:30 -0600

Eli Zaretskii <[email-masked]> writes:

>> From: Alex Gramiak <[email-masked]>
>> Cc: [email-masked]
>> Date: Mon, 15 Apr 2019 10:18:24 -0600
>> 
>> > What does "C-h l" show after that?
>> 
>> A couple days ago I had a similar event happen (busy cursor pops up, and
>> a few seconds later normal mouse scrolling occurred). C-h l in that
>> window:
>> 
>>   <help-echo> <down-mouse-5> <mouse-5> [mwheel-scroll]
>>   <double-down-mouse-5> <double-mouse-5> [mwheel-scroll]
>>   <triple-down-mouse-5> <triple-mouse-5> [mwheel-scroll]
>>   <triple-down-mouse-5> <triple-mouse-5> [mwheel-scroll]
>>   <triple-down-mouse-5> <triple-mouse-5> [mwheel-scroll]
>>   <triple-down-mouse-5> <triple-mouse-5> [mwheel-scroll]
>>   <triple-down-mouse-5> <triple-mouse-5> [mwheel-scroll]
>>   <down-mouse-4> <mouse-4> [mwheel-scroll]
>>   <double-down-mouse-4> <double-mouse-4> [mwheel-scroll]
>>   <help-echo> <down-mouse-5> <mouse-5> [mwheel-scroll]
>>   <down-mouse-5> <mouse-5> [mwheel-scroll]
>>   C-h l [view-lossage]
>
> So somehow, Emacs receives a long series of mouse wheel-scrolling
> events, perhaps due to multiple down-mouse events.  And since we have
> mouse-wheel-progressive-speed, a series of such events produces
> scrolling far away.

Unfortunately, I set mouse-wheel-progressive-speed to nil a long time
ago.

> 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.

>> P.S. Is there a way to get the event time in C-h l? If not, I think
>> there should be an option for that.
>
> How would that help?  You'll most probably see very close times there.

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 was also thinking that it might be helpful in other
bug reports involving events.

> What kind of mouse is this?  Is that by any chance a mouse pad of a
> laptop?

No, just a regular desktop mouse with a scroll wheel.