[PATCH libinput 5/6] touchpad: Don't allow diagonal scrolling
Jonas Ådahl
jadahl at gmail.com
Tue May 27 01:18:15 PDT 2014
On Tue, May 27, 2014 at 04:43:01PM +1000, Peter Hutterer wrote:
> On Mon, May 26, 2014 at 09:06:50PM +1000, Peter Hutterer wrote:
> > On 26/05/2014 16:32 , Hans de Goede wrote:
> > >Hi,
> > >
> > >On 05/25/2014 10:34 AM, Jonas Ådahl wrote:
> > >>On Fri, May 23, 2014 at 04:06:26PM +0200, Hans de Goede wrote:
> > >>>We pin scrolling to the initial direction, so a 2 finger scroll starting
> > >>>in the vertical direction, will from then on only generate vertical scroll
> > >>>events, and the same for horizontal.
> > >>>
> > >>>But if the first 2 finger motion is diagonal, then we go into a diagonal
> > >>>scrolling mode where we post both horizontal and vertical scrolling events.
> > >>>
> > >>>This is inconsistent, if we want to allow both at the same time (which we
> > >>>don;t), we should always allow both, not only when the first motion is
> > >>>diagonal.
> > >>
> > >>Is this really the case? Personally I expect to be able to scroll both
> > >>horizontally and vertically at the same time, for example for scrolling
> > >>around in a large photograph, and this is already how it works with the
> > >>current synaptics driver in X.
> > >
> > >Since Peter did the original lock scrolling to one direction bits (I think),
> > >I'll let answering this up to Peter.
> >
> > I think this is the best approach for now, but we need something more
> > fine-grained eventually. I've got an item on my todo list to make this
> > pending some threshold, i.e. moving past that threshold activates horizontal
> > scrolling.
> >
> > The main reason for the threshold is that moving up and down is really hard
> > to do vertically, so you almost always have some horizontal component to it.
> > In most cases, that's not intended though, so a slight lock to the scroll
> > direction is needed. The threshold doesn't need to be high, just enough to
> > avoid erroneous left-right scrolling.
>
> replying to myself here:
> I've gone ahead and pushed 1-4 of this series because I'm happy with those.
> 5 and 6 I'm leaving for today. Now that I have a good debugging tool,
> locking it to one direction feels wrong, but having the spurious scroll
> events in the horizontal direction isn't good either.
>
> I'll see if I can come up with something in the next couple of days that
> avoids both issues.
I did try out this patch a couple of days ago, and beside the fact that
I felt the only-on-axis-scrolling to be awkward, I noticed I had a very
hard time actually getting it to scroll horizontally.
Anyway, not going horizontal if the scroll vector is mostly vertical
until a threshold, then change mode to free-scrolling-mode sounds like
it could work.
Speaking of debugging tools, to test the feel of scrolling, I've been
using "weston-image" to scroll around a zoomed image. The fact that the
image program does this is a proof of concept of what one can do with
the Wayland axis events with two finger scrolling. Ctrl-scroll zoomes
in and out, and just scroll pans around the zoomed image IIRC.
Jonas
>
> Cheers,
> Peter
>
More information about the wayland-devel
mailing list