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

MacOS: TapHandler with acceptedButtons: Qt.RightButton sometimes handles wrong button click (Qt.LeftButton)

XMLWordPrintable

    • macOS

      Sometimes, after pinch gestures on macbook's touchpad, TapHandlers start working incorrectly.

      Please see attached example.

      TapHandler is configured to accept Qt.RightButton only, but it accepts left button click.

      TapHandler {
                      id: rightButtonTH
                      acceptedButtons: Qt.RightButton
                      onTapped: function(eventPoint, button) {
                          console.debug("Right button handler tapped: " + button)
                          if (!(button & rightButtonTH.acceptedButtons)) {
                              console.error("Right button handler - WRONG BUTTON")
                          }
                      }
                  }
      

      The result is on screenshot. rightButtonTH emits tapped, while it should accept right button only, and left button is clicked.

      To reproduce with attached example:
      Compile and run the app, mouse cursor should be outside the window. Move cursor to the white area of the window. Do a quick pinch gestures (like zoom in - zoom out). Then move cursor over inner rectangle and press left button (just 1 finger tap).
      eventFilter correctly shows left button, all TapHandlers also show left button, however TapHandler that should process right button only - is triggered also.

      Note: it reproduces not in 100% of tries.

        1. Screenshot 2023-03-23 at 12.15.15.png
          1.14 MB
          Sergei Nevdakh
        2. TapIssues.zip
          4 kB
          Sergei Nevdakh
        For Gerrit Dashboard: QTBUG-112247
        # Subject Branch Project Status CR V

            srutledg Shawn Rutledge
            sergei.nevdakh Sergei Nevdakh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change