Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.0
-
None
Description
Note: I can try to debug this issue if I get some hints...
Context:
I am trying to mock up a pinch gesture on desktop to do coarse debugging of an Android application. But it can also improve the support of Wacom pro tablet in Qt.
Solutions could be
- use the Android emulator : this is slower than native
- use a computer with a touchscreen : expensive
- inject touch events in Qt : aka Qt Test
- use a tablet with a touchpad (on Wayland) : cost ~ 200€
- forward and inject touch events from a smartphone to the desktop : cheaper, but must implement it... QML Android toy app -> send events over IP -> Application on desktop -> inject events in Qt event loop
Test environment:
- OS is Fedora 36 on Wayland
- Tablet is a Wacom Intuos Pro with a touchpad
- Test application is a custom QML demo with MouseArea, MultiPointTouchArea, PinchArea, PinchHandler, PointHandler, TapHandler
- source https://github.com/FabriceSalvaire/qt-examples/blob/main/python-examples/input-device/view.qml
Results:
- [OK] mouse with one finger: move, click, double click
- [OK] (X, Y) wheel with one static finger and a second one moving, or double moving fingers. Horizontal wheel is more erratic and increase to the left !!
- [OK] PinchHandler: target scale and rotate
- [NOK] PinchArea: no signals, no action on target
- PointHandler requires a double tap and move to act as the mouse to drag an item???
- for MultiPointTouchArea, Wayland doesn't send any events...
Wayland trace:
Pinch gesture event are sent to the application
[ 624509.430] zwp_pointer_gesture_pinch_v1@21.begin(23109, 16609422, wl_surface@27, 2) [ 624509.589] zwp_pointer_gesture_pinch_v1@21.update(16609422, 1.16796875, -1.65625000, 0.98046875, 0.14453125) ... [ 626129.266] zwp_pointer_gesture_pinch_v1@21.end(23110, 16611041, 0)
See https://wayland.app/protocols/pointer-gestures-unstable-v1
Notice Wayland only send gesture event. Raw touch events are available from libinput (tested with evtest).
I don't found any swipe events in the log.
zwp_pointer_gesture_pinch_v1 occurrences in Qt Wayland source are found in these files
- src/3rdparty/protocol/pointer-gestures-unstable-v1.xml
- src/client/qwaylandpointergestures_p.h
- src/client/qwaylandpointergestures.cpp