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

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

    XMLWordPrintable

Details

    • macOS

    Description

      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.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change