[PATCH libinput 5/6] touchpad: Don't allow diagonal scrolling

Peter Hutterer peter.hutterer at who-t.net
Mon May 26 23:43:01 PDT 2014


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.

Cheers,
   Peter



More information about the wayland-devel mailing list