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

OS X: FrameStrutMouseEvent causes spurious double-clicks

XMLWordPrintable

    • macOS
    • 0f644f48530f4693f7c77fd41ca42085b3218e81

      I see spurious double clicks appearing in a QML MouseArea during a drag operation starting in that MouseArea and leaving the window, while crossing the OSX window titlebar. Though I have not yet managed to isolate a repro, I have managed debug sufficiently to understand the problem:

      If frameStrutEventsEnabled() is set for the QCocoaWindow(), handleFrameStrutMouseEvent is called with NSLeftMouseDragged events.

      In qnsview.mm, the handleFrameStrutMouseEvent routine has a switch statement that handles NSLeftMouseDown and NSLeftMouseUp but ignores NSLeftMouseDragged, so it creates a FrameStrutMouse event with no buttons pressed (even though the Dragged event indicates that I am still holding a button!)

      QGuiApplicationPrivate::processMouseEvent then processes this event and interprets it as QEvent::NonClientAreaMouseButtonRelease storing the wrong information about the non-pressed buttons and causing a subsequent mouse move (with buttons still pressed) to simulate a double-click.

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

            sorvig Morten Sørvig
            nnemec Norbert Nemec
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes