Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0, 5.3.0 Beta1
-
Android 4.3 on Samsung Galaxy Note 3,
Android 4.2.2 on Samsung Galaxy Note 8.0 (GT-N5110)
-
-
21a0e3c111b97035a01b6386a4e9ecda2d2febf8 01d78ba86a631386a4d47b7c12d2a359da28f517
Description
(Originally reported as second issue in QTBUG-36105.)
When dragging the pen over the screen, only the press and release events were reported, but no move events. The reason was getAction() in src/android/jar/src/org/qtproject/qt5/android/QtNative.java. For move events it checks whether the last "historical" and the most current position are equal and in this case it sets the move event type to 2. This is translated to a Qt::TouchPointState of Qt::TouchPointStationary in src/plugins/platforms/android/src/androidjniinput.cpp, but this is wrong according to the Android MoveEvent documentation ( http://developer.android.com/reference/android/view/MotionEvent.html ), quoted here:
Batching
For efficiency, motion events with ACTION_MOVE may batch together multiple movement samples within a single object. The most current pointer coordinates are available using getX(int) and getY(int). Earlier coordinates within the batch are accessed using getHistoricalX(int, int) and getHistoricalY(int, int). The coordinates are "historical" only insofar as they are older than the current coordinates in the batch; however, they are still distinct from any other coordinates reported in prior motion events. To process all coordinates in the batch in time order, first consume the historical coordinates then consume the current coordinates."
So there are actually multiple issues here:
- All of the given coordinates should be processed, including the "historical" ones.
- Only if this is done can an equality check between successive coordinates be applied. Apparently the Galaxy Note's stylus handling always reports the same coordinate as the last "historical" one and the current coordinate.
Attachments
Issue Links
- duplicates
-
QTBUG-36055 S-Pen Support for Android Sumsung Devices
- Closed
- is duplicated by
-
QTBUG-43237 problem with samsung galaxy note S-Pen
- Closed
- relates to
-
QTBUG-36105 Android: Stack overflow when hovering widgets with Galaxy Note SPen
- Closed
- resulted in
-
QTBUG-51618 Android: the stylus sends QTabletEvent but not QMouseEvent
- Closed