[Development] Touchpad gestures on Wayland
Povilas Kanapickas
povilas at radix.lt
Wed Dec 2 23:17:59 CET 2020
Hi Shawn,
On 12/2/20 7:42 AM, Shawn Rutledge wrote:
>
>> On 2 Dec 2020, at 00:38, Povilas Kanapickas <povilas at radix.lt
>> <mailto:povilas at radix.lt>> wrote:
>>
>> Hello,
>>
>> I would like to implement support for Wayland touchpad gestures[1] to
>> Qt. Would you potentially accept such a contribution from an outside
>> developer if the CLAs are signed and other legal conditions are accepted?
>>
>> Wayland currently provides swipe and pinch touchpad gestures which could
>> be represented by QPinchGesture and QSwipeGesture classes. It seems that
>> the gesture events could be handled just like they are handled on macOS,
>> but this needs a proof of concept to make sure the assumption holds.
>
> Yes that sounds right to me. Even more urgent I think is to get
> QWheelEvents with pixel deltas and scroll phases, like we have on macOS,
> when you are using the flick gesture (two-finger-flick, maybe edge flick
> if it’s configurable).
That's nice to hear.
I agree that it makes sense to work on QWheelEvents working first.
>> If you agree that it makes sense for me to work on this feature, I will
>> come back with a more concrete proposal later.
>>
>> Previously I've implemented touchpad gesture support in X11 and the X11
>> backend of Gtk so I know a little bit about this area. The code is
>> currently under review and once it's merged to X11 I'll come back with a
>> proposal for this part of Qt too.
>
> I will work with you on this.
>
> There was another patch someone started to add this for libinput, but
> then gave up for some reason, so I was thinking of getting back to it
> myself eventually:
>
> https://codereview.qt-project.org/c/qt/qtbase/+/293172
If I remember correctly on Linux desktop systems one needs additional
permissions to get access to the libinput events directly. I assume this
libinput backend is used in various embedded systems and the like, is
that right?
I think I could finish this PR once the Wayland part is done. I've done
pretty much the same thing in the libinput input driver for Xorg [1].
> Maybe we could support trackpad gestures on X11 too?
Yes, I will work on that. We need to have in mind that the X server
itself does not yet have support for trackpad gestures - the API and
code is under review. I will need some way to prove to the X server
reviewers that the API is sound and for that real (even if experimental
and not reviewed/merged/released) API consumers in the widget toolkits
is the best way.
Cheers,
Povilas
[1]:
https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/17
More information about the Development
mailing list