[Top][All Lists]

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

Re: Smoother macOS touchpad scrolling

From: Alan Third
Subject: Re: Smoother macOS touchpad scrolling
Date: Sat, 9 Sep 2017 09:18:05 +0100
User-agent: Mutt/1.7.2 (2016-11-26)

On Sat, Sep 09, 2017 at 07:21:23AM +0900, Tak Kunihiro wrote:
> > +(setq mouse-wheel-scroll-amount '(1 ((shift) . 5)))
> > +(setq mouse-wheel-progressive-speed nil)
> I thought one of good things about your patch is to make scrolling smooth
> without changing default.  No?
>   http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00624.html

That was the plan, but I’ve run into some difficulties:


This patch is a compromise between trying to improve the experience on
macOS and not adding new features that we don’t have under X.

I think progressive speed needs to be off, however, as macOS adds its
own acceleration. If you leave it on, then you’re doubling up on
progressive scrolling.

Probably the scroll amount change should be removed from this patch,

> > +          int lineHeight = default_line_pixel_height(XWINDOW 
> > (FRAME_SELECTED_WINDOW (emacsframe)));
> A buffer with images has lines with different height.
> I think lineHeight should be
>  - height of 1 line (or sum of 5 lines) at the top on a screen
>    when scrolling up
>  - height of unseen 1 line (or sum of unseen 5 lines) above the
>    top out of screen when scrolling down.

I considered this but couldn’t find an easy way to get that
information in C. There probably is, I just couldn’t find it.

I also don’t think it’s too important as we’re not doing real
pixelwise scrolling. I considered just using a constant value, like
10, as I think that would still provide a better experience than we
have currently.

The reason I didn’t use a constant is in cases where the user zooms
out, or otherwise has very small text on the screen, they might expect
the scrolling to move more lines in that case. (Although, with more
experimentation, I don’t think default_line_pixel_height does what I
thought it did, as making the text very small or very big doesn’t seem
to change the scrolling behaviour.)

Additionally, if you do have a *very* large image on a line, then it
could look as though scrolling is not actually doing anything.

If the consensus is that using the actual line heights is preferable,
then I’m happy to make that change.
Alan Third

reply via email to

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