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

Flickable can't grab a second touchpoint while the first is already held by a child

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.0.0 Beta2
    • None

    Description

      tst_FlickableInterop::touchDragSliderAndFlickable fails now. Since https://codereview.qt-project.org/c/qt/qtdeclarative/+/315938 it's like this: Flickable can handle touch events directly. The first touchpoint gets grabbed by the slider's DragHandler though, and it also sets keepTouchGrab() to prevent Flickable from taking over the grab. QQuickFlickable::childMouseEventFilter() continues receiving single-point touch events, because they are customized for delivery to the slider item (Rectangle): the second touchpoint is elsewhere. Flickable doesn't receive that second touchpoint because it's playing by the old rules: it didn't grab on press, so it won't get the updates.

      In Qt 5 of course we got it working via touch->mouse synthesis, which happens with the second touchpoint while the first is already occupied. That simplified the decision for Flickable.

      So if we want this scenario to work, it's going to need to be based on a new theory of operation now. I suppose on the principle of starting over with delivery when a new point is pressed, Flickable should see the press of the second point via direct delivery, and grab it. Or maybe it should start doing passive grabs now, like DragHandler does.

      In fact, the only reason it didn't get the second point by direct delivery was because DragHandler is accepting the whole QTouchEvent with both points. It should not do that now: it should only accept the point(s) that it takes responsibility for. That can be fixed.

      Next problem: QQuickFlickable::filterPointerEvent() is written as if it will only ever see one point, and it either grabs or calls returnToBounds(). It keeps giving up like that: because it fails to take over the grab from the slider, it doesn't react to the other point.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change