Details
-
Task
-
Resolution: Done
-
P3: Somewhat important
-
None
-
None
Description
libinput added gesture recognition some years ago. The corresponding wayland protocol is zwp_pointer_gestures_v1 https://github.com/wayland-project/wayland-protocols/blob/master/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml Various compositors support it. So we should be able to generate a QNativeGestureEvent when an application receives a gesture from the compositor, such that Qt applications running on those compositors will act a lot like when using the trackpad on macOS: PinchHandler reacts to the touchpad pinch gesture, mainly.
The swipe gesture also exists on macOS, but we don't react to it in any Qt Quick handlers (or items) yet. When we figure out what should be the difference between pan and swipe, and what each of them should be used for, we should do something with both, ideally. But this wayland protocol only defines pinch and swipe. The swipe update events contain dx and dy in pixels, whereas QSwipeGesture has enum directions and an angle, and QNativeGestureEvent has value(): a single qreal, which is used for a quantized angle on macOS currently (90, 180, 270, 0... apparently dx and dy can only be ±1 there); but the storage is already big enough to store a QPointF if we need to (we have no current use for the qint64 in that class, actually).
Next, we could use libinput gestures in the eglfs plugin, and be able to send that protocol in Qt wayland compositors; but those can be other tasks beyond this one.
Attachments
Issue Links
- depends on
-
QTBUG-92179 get PanNativeGesture working where possible, and/or add deltas to SwipeNativeGesture
- Closed
- relates to
-
QTBUG-92165 REG 5.15->6.0: when PinchHandler and DragHandler are used together, trackpad pinch gesture causes a jump
- Closed
-
QTBUG-92064 PinchHandler target scale jumps when pinching a second time via native gesture
- Closed
-
QTBUG-92086 Add an *Handler way to detect swipe gestures in QtQuick
- Reported
-
QTBUG-96227 Support high-resolution scrolling using libinput
- Closed