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

Peter Hutterer peter.hutterer at who-t.net
Mon May 26 04:06:50 PDT 2014


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.

Cheers,
   Peter



More information about the wayland-devel mailing list