GNU bug report logs -
#61307
30.0.50; pixel-scroll-precision-mode: window-scroll-functions?
Previous Next
Full log
Message #44 received at 61307 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: 61307 <at> debbugs.gnu.org
> Date: Wed, 15 Feb 2023 05:06:12 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > > I don't see the hook called for each pixel. What do you mean?
> >
> > Each time you do the smallest possible scroll, by how many pixels, or
> > by what fraction of the screen-line's height does Emacs scroll the
> > window? IOW, by how many pixels is the display scrolled for each call
> > to window-scroll-functions?
> >
> > Precision pixel-scrolling supports many different devices (mice and
> > touch-pads), which can scroll at very different resolutions. The
> > possibility that window-scroll-functions be called too frequently
> > depends on what exactly do your device and your Emacs build support in
> > this scenario, and I don't yet have a clear idea about that, since you
> > didn't tell.
>
> I feel a bit lost. What should I tell? I have no idea what I could
> know about this that you don't already know.
I hoped you will answer the specific questions I asked, quoted above.
But since you don't have a device to actually observe
pixel-scroll-precision-mode on your system, something I didn't know
until now, I guess you cannot answer them? (I also don't have access
to a suitable system, otherwise I wouldn't have bothered you with the
questions.)
> But I understand that what I see when scrolling with a normal wheel
> mouse is only one case we need to handle.
Right. Though on such a system, we should probably call
window-scroll-functions every scroll.
> AFAIU, scrolling by
> dragging the vertical scroll bar is not handled by precision scrolling.
Correct.
> So we speak about touch events (although
> `pixel-scroll-precision-mode-map' only binds <touch-end>, but that event
> may also be generated very often) and mice with a more or less
> continuous scroll wheel (or ball) and such things.
Yes, capable mice (which also require a capable system to support
them), and touch pads.
> Or would you suggest to call the window-scroll functions just after a
> certain time limit?
I don't think a timer would be appropriate here.
> A pixel-delta limit would probably not be
> sufficient, since we want to call the functions also for small scroll
> amounts if they are not directly followed by another scroll (I guess).
Not necessarily. To see a similar situation, disable
image-auto-resize mode, visit a large image, and scroll with C-n or
C-p: you won't see window-scroll-functions called at all. That's
basically what pixel-scroll-precision-mode works: it uses the window's
vscroll, like we do with tall images.
This bug report was last modified 2 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.