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

Mouse co-ordinates are not always adjusted when MouseArea's state changes

    XMLWordPrintable

Details

    Description

      This was seen with QML compiled from qt/qt-qml and HEAD at
      5eb8e749bdd60ce93737b96f8f736796dfa77281 and tesla with HEAD at
      a1ac83bfa94cb23f9e7518c3d82def89555e91b1

      Clicking within a MouseArea without moving the mouse now generates the
      following events
      1) onPressed
      2) onPositionChanged
      3) onReleased
      4) onClicked

      If at any point the MouseArea's state (e.g, size and position) change, this must
      be reflected in the mouse coordinates reported to each subsequent event.
      Currently this is not the case.

      In the case of tesla, the implementation of the onPressed signal reparents the
      MouseArea and makes it full screen, yet the mouseX and mouseY reported to
      the onPositionChanted event that follows does not adjust the coordinates for
      this.

      To see the problem, launch tesla and open the launcher page and scroll to the
      second page. Then long-press an icon to enter edit mode, then tap any icon
      and note how the it disappears. It has in face been moved to the previous page
      (once the page is full the icons stay then tapped). Note that dragging the mouse
      even slightly before releasing the button avoids this problem.

      Attachments

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

        Activity

          People

            lscunha Leonardo Sobral Cunha (Inactive)
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes