emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs Master d277123f4bf] pixel-scroll-precision-scroll-up-page fee


From: JD Smith
Subject: Re: [Emacs Master d277123f4bf] pixel-scroll-precision-scroll-up-page feels pause, but pixel-scroll-precision-scroll-down-page is smooth
Date: Tue, 3 Sep 2024 14:14:35 -0400

> On Sep 3, 2024, at 5:56 AM, Eval EXEC <execvy@gmail.com> wrote:
> 
> Then I open a rust project.
> 
> use touchpad to scroll up and down. When I use touchpad to `triple-wheel-up`, 
> I feel very lag and pause.
> 
> When I `triple-wheel-down`, it's very smooth.
> 
> 
> Why `pixel-scroll-precision-scroll-up-page` is very lag and pause, but 
> `pixel-scroll-precision-scroll-down-page` is very smooth?

This asymmetry is inherent to vscroll, which, although very fast, is only 
available "below" the displayed screen contents.  To quote the FAQ of my 
ultra-scroll-mac[1] package:

    • Scrolling asymmetry:
        • vscroll is purely one-sided: you can only access a vscroll area 
beneath the current window view; there is no negative vscroll.
        • Unlike window-start, window-end does not get updated promptly between 
redisplays and cannot always be trusted.
        • For these two reasons, smooth scrolling up and scrolling down are not 
symmetric with each other (and will likely never be). You need different 
approaches for each.
        • If the two approaches for scrolling up and down perform quite 
differently, the user will feel this difference.

The algorithms employed in ultra-scroll-mac are (in my testing) measurably 
faster than the ones in pixel-scroll-precision (from which it was inspired), 
although up is still slower than down.  They also enable smooth scrolling past 
images which are taller than the window.  See the functions 
`ultra-scroll-mac-up/down'.  

Unfortunately this package only works on the Carbon emacs-mac port, which 
exposes rich scroll events with pixel-level delta data.  But the core scroll 
algorithms could potentially be adapted to pixel-scroll-precision-mode, and I'd 
be happy to contribute them if anyone takes this up.  I have also wondered 
whether other systems like Linux/GTK have standard APIs for delivering 
high-speed touchpad events, which would allow pixel-scroll-precision to get out 
of the business of simulating these.

[1] https://github.com/jdtsmith/ultra-scroll-mac




reply via email to

[Prev in Thread] Current Thread [Next in Thread]