New guy

Stefanos A. stapostol at gmail.com
Wed Jul 16 05:42:40 PDT 2014


2014-07-16 14:14 GMT+02:00 Magnus Hoff <maghoff+wayland at gmail.com>:

> Hi Jasper :) Thanks for your response! :)
>
> On Tue, Jul 15, 2014 at 1:59 PM, Jasper St. Pierre
> <jstpierre at mecheye.net> wrote:
> > On Tue, Jul 15, 2014 at 7:48 AM, Magnus Hoff <maghoff+wayland at gmail.com>
> > wrote:
> >>  * Support for (sub-)pixel resolution of two-finger scroll. In X.org,
> >> two-finger scroll is mapped to button-events, which means that the
> >> resolution of scrolling is reduced to line-level. Can we support such
> >> smooth scrolling in wayland?
> >
> >
> > Smooth scrolling is supported in XI2 by some special axes, but not a lot
> of
> > applications support this.
>
> XI2... is that this thing?
> http://www.x.org/releases/X11R7.6/doc/inputproto/XI2proto.txt
>
> So, you're telling me that X.org does indeed support smooth scrolling,
> but I have not experienced it because (basically) none of the
> applications have implemented support?
>

Exactly.

Gnome 3 applications tend to have smooth scrolling support, provided your
touchpad drivers support it. Try testing with gedit or web (the web
browser), for example. Alternatively, run "xinput --test-xi2" in a terminal
and try two-finger scrolling. If you see floating-point values, then your
system supports smooth scrolling.

(Unfortunately, the scrolling acceleration curve is terrible, at least for
synaptics, so smooth scrolling is simply not as good as it could/should be.)

> Scrolling in Wayland is done by the "axis" event [0], which describes
> > relative changes on an axis, and not by button presses. So apps couldn't
> do
> > chunky scrolling even if they wanted to!
>
> That sounds good :)
>

Tell that to SDL2, which still thinks scrolling is happening in integer
chunks. Yeah, one whole class of applications that really *could* use
smooth scrolling, namely games, simply does not support that when using the
leading toolkit.

It's the same chicken-and-egg problem as XI2: to get smooth scrolling you
have to jump over so many hoops that prefer to simple use core X11 events.
Yes, scrolling sucks then, but the code is dead simple: just add a new case
in a switch statement. (It doesn't help that XI2 documentation is hard to
come by, compared to X11 documentation. The only available sample code is
found in Peter Hutterer's blog and half a dozen random repositories, like
Qt...)

Which is to say, libinput/Wayland do the right thing here: provide the
proper solution in the common code path, so application developers can't go
wrong even if they try. Hopefully, this will mean that Firefox/Chrome etc
will finally get proper smooth scrolling on Linux. Here's to hoping!

/rant off
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140716/33d826e1/attachment.html>


More information about the wayland-devel mailing list