[PATCH synaptics] support inverted scroll direction

Alyssa Hung ahung at isisview.org
Thu Apr 12 22:30:42 PDT 2012


On 12 April 2012 23:50, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> On Wed, Apr 11, 2012 at 10:00:56PM -0400, Alyssa Hung wrote:
>> This patch adds two options to the synaptics driver: InvertEdgeScroll
>> and InvertTwoFingerScroll.
>>
>> When enabled, they will cause the scroll direction to be inverted when
>> edge scrolling and two-finger scrolling, respectively. For instance,
>> moving a finger downward along the right edge will pull the scrolled
>> content down (causing the page to scroll up). This behaviour is
>> consistent with scrolling on modern touchscreen devices.
>>
>> Options are provided separately for edge scrolling and two-finger
>> scrolling because they follow different metaphors; edge scrolling has
>> traditionally been analogous to dragging the scrollbar tab, and may
>> therefore be sensible to leave uninverted even when two-finger scroll
>> direction is inverted.
>>
>> Signed-off-by: Alyssa Hung <ahung at isisview.org>
>
> Thansk Alyssa, two comments regarding this option:
> In general, I'm not in favour of adding more options to synaptics. This
> particular one is something that we need to deal with in other drivers as
> well. With server 1.12, scrolling is now controlled by the increment in the
> XIScrollClass, simply changing that could change not only the speed but
> also the direction. While support for modifying the increment is the best
> solution, it needs a protocol revision.
>
> In this particular case, synaptics already has a
> VertScrollDelta and HorizScrollDelta option that controls the amount of
> movement before a scroll event is emitted. I think it should be simple
> enough to change the code that negative deltas are permitted for scroll
> direction inversion.
>
> Cheers,
>  Peter

Hi Peter, thanks for your advice.

I wasn't aware of XIScrollClass increments or their relationship to
the VertScrollDelta and HorizScrollDelta options. Following your
recommendation, I have attached a patch that allows them to be set to
negative values.

I regret that it won't be possible to invert scroll direction for only
two-finger scrolling or edge scrolling, but I suppose it isn't a
common use case for them to both be enabled.


Regards,

Alyssa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-inverted-scroll-direction.patch
Type: application/octet-stream
Size: 3248 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120413/881da9bf/attachment.obj>


More information about the xorg-devel mailing list