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

Mac: No way to distinguish touch pads from regular mice that support pixel scrolling

    XMLWordPrintable

Details

    • macOS

    Description

      Since this change it is not possible to distinguish between mice that support pixel scrolling and touch pads.

      Our use case is that we support panning with wheel events if it is a touch pad, otherwise wheel events are interpreted as zoom.

      Is it really correct to just override the device type for any device here?

      As a workaround we tried to look at the capabilities of the device, since touch pads seem to be set up in `QCocoaTouch::getTouchDevice`, unfortunately it is not reliable since depending on if we get a mouse event before the touch device is set up, the primary device assumes the id of the touch pad in `pointingDeviceFor`, causing 2 devices to have the same id, making all input events use the wrong device without the correct capabilities.

       

      The specific issue is with Logitech mice, using the Logi Options+ software, but we assume it is possible for other mice to report pixel scroll as well.

       

      Repro steps for the bug on a mac book:

      •  Start the app without moving the mouse via the touch pad, either just wait or use an external mouse initially. The touch pad device will now have the correct capabilities for the rest of the session.
      • Start the app while continuously moving the mouse with the touch pad. There will be a mouse event before the touch pad device has been created and this will make the primary device adopt the touch pads deviceID.

      Attachments

        1. QTBUG-130300.cpp
          0.2 kB
          Viktor Arvidsson

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change