Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92098

support touchpad gestures on Wayland (client)

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/Wayland
    • Technical Risk:
      Normal

      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

          For Gerrit Dashboard: QTBUG-92098
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              povilas Povilas Kanapickas
              Reporter:
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes