RFR: 8282104: Node zoom/rotate flickers on Raspberry Pi with Touchscreen

Kevin Rushforth kcr at openjdk.java.net
Fri Feb 18 21:07:01 UTC 2022


On Fri, 18 Feb 2022 17:04:08 GMT, Alexander Scherbatiy <alexsch at openjdk.org> wrote:

> 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.

I see that this fix is limited to Monocle. Maybe @johanvos can review.

-------------

PR: https://git.openjdk.java.net/jfx/pull/737


More information about the openjfx-dev mailing list