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

wayland plugin should distinguish touchpads from mice, etc.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.0, 6.5.0 RC
    • QPA: Wayland
    • None
    • fbe6f3f4b (dev), 19eaf9f0e (6.5), 8d11e05f8 (dev), 62f83ac45 (6.5), ea4501366 (tqtc/lts-6.2), 32a56ba8f (dev), e801fced5 (6.7), 8473329c2 (6.6), 97fd6ce85 (tqtc/lts-6.5)

    Description

      registerInputDevice() is called from QWaylandInputDevice::seat_capabilities(uint32_t caps) ; in that context we have so far not been able to get enough information about the device capabilities etc. The seat capabilities don't include very many flags:

      enum wl_seat_capability {
      	/**
      	 * the seat has pointer devices
      	 */
      	WL_SEAT_CAPABILITY_POINTER = 1,
      	/**
      	 * the seat has one or more keyboards
      	 */
      	WL_SEAT_CAPABILITY_KEYBOARD = 2,
      	/**
      	 * the seat has touch devices
      	 */
      	WL_SEAT_CAPABILITY_TOUCH = 4,
      };
      

      I left a TODO comment in https://codereview.qt-project.org/c/qt/qtwayland/+/301231 about this, but I still don't understand if there's anything in wayland protocol that lets us distinguish individual devices and their capabilities. I think surely such a feature must be in demand, not only from us.

      WheelHandler's ctor has
      setAcceptedDevices(QInputDevice::DeviceType::Mouse);
      so since QWaylandInputDevice::seat_capabilities() assumes that it's a touchpad (because if you have a laptop touchpad, you want to be able to use native gestures), you often have to override WheelHandler's acceptedDevices to PointerDevice.Mouse | PointerDevice.TouchPad in order to get it to react. This is really not ideal.

      Furthermore, we'd like QInputDevice::devices() to provide as complete a list as possible.

      Wayland at this point is behaving just as badly as macOS: we can't get the devices; perhaps we could see at runtime that touchpad-like events are happening, but I hope we can eventually do better than that, even if it depends on some Wayland extension that is not yet written.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: