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

need to check mouse and touch residual velocity modeling

    XMLWordPrintable

Details

    Description

      Imagine swiping a finger across a big touchscreen, sometimes touching and sometimes not. There are no events when the finger is hovering, only when it's touching; nevertheless, the finger has velocity, even though we can't measure it. So it seems fair to assume that the velocity on press is related to the velocity on the previous release, if it occurs within a short time. But currently the Kalman filter in QMutableEventPoint::setTimestamp() may not be simulating (an assumed) deceleration very well; this needs more testing. If there were no events for some short interval, we should probably "prorate" the velocity back to zero.

      You could do this with a physical mouse too: drag across a desktop at a constant speed but tap the buttons intermittently. And in this case, we do get events for the moves between the taps; so the simulation of deceleration is not needed, because we measure it directly, as long as we receive all the mouse move events (when it leaves the window, usually we don't get them anymore).

      In autotests, residual velocity is annoying: it is a way that one test case can affect another. And we don't want to add delays to make the tests run as slow as real users would run them. So it seems we need a way to reset velocity between test cases, at least. It should be automatic somehow so that we don't have to modify a lot of tests.

      We could also reset it to zero on release, but that doesn't seem physically accurate, and in fact I think the mouse or touch release event itself should be delivered with the velocity that the eventpoint had at the time of release: the same velocity from the previous move event.

      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
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes