RFR: 8282104: Node zoom/rotate flickers on Raspberry Pi with Touchscreen
Alexander Scherbatiy
alexsch at openjdk.java.net
Fri Feb 18 17:10:20 UTC 2022
Zoomed/Rotated with two fingers rectangle flickers (unexpectedly becomes pretty small or large and then returns back to previous size several times during zooming/rotating) on a Raspberry Pi with Touchscreen.
The log with traced events shows that it is possible that only one ABS_MT_POSITION_X or ABS_MT_POSITION_Y can be sent for a given slot. In this case the corresponding omitted Y/X value is undefined and is assigned from ABS_Y/X value. This produces incorrect result for slots different from 0.
Example of the trace events log, enabled by `-Dmonocle.input.traceEvents.verbose=true -Dmonocle.input.traceEvents=true` flags:
traceEvent: Processing EV_ABS ABS_MT_SLOT 1 [index=48]
traceEvent: Processing EV_ABS ABS_MT_TRACKING_ID 302 [index=64]
traceEvent: Processing EV_ABS ABS_MT_POSITION_X 399 [index=80]
traceEvent: Processing EV_ABS ABS_MT_POSITION_Y 272 [index=96]
traceEvent: Processing EV_KEY BTN_TOUCH 1 [index=112]
traceEvent: Read EV_ABS ABS_MT_SLOT 0 [index=176]
traceEvent: Read EV_ABS ABS_MT_POSITION_Y 315 [index=192]
traceEvent: Read EV_ABS ABS_Y 315 [index=208]
traceEvent: Read EV_SYN SYN_REPORT 0 [index=224]
...
traceEvent: Read EV_ABS ABS_MT_SLOT 1 [index=320]
traceEvent: Read EV_ABS ABS_MT_POSITION_Y 271 [index=336]
traceEvent: Read EV_ABS ABS_X 552 [index=352]
traceEvent: Read EV_ABS ABS_Y 322 [index=368]
traceEvent: Read EV_SYN SYN_REPORT 0 [index=384]
First both ABS_MT_POSITION_X/Y events with values x: 399 and y: 272 are received for the slot 1.
Next only ABS_MT_POSITION_Y with y: 271 value is received (which implies that the x value has not been changed) for the slot 1.
The x value is undefined in the LinuxStatefulMultiTouchProcessor.processEvents() loop and is unexpectedly assigned to the ABS_X 552 value which belongs to the slot 0.
The fix skips setting ABS_X/Y values for slots different from 0.
-------------
Commit messages:
- 8282104: Node zoom/rotate flickers on Raspberry Pi with Touchscreen
Changes: https://git.openjdk.java.net/jfx/pull/737/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=737&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8282104
Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jfx/pull/737.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/737/head:pull/737
PR: https://git.openjdk.java.net/jfx/pull/737
More information about the openjfx-dev
mailing list