jfx
jfx copied to clipboard
8282104: Node zoom/rotate flickers on Raspberry Pi with Touchscreen
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.
Progress
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
- [ ] Change must be properly reviewed
Issue
- JDK-8282104: Node zoom/rotate flickers on Raspberry Pi with Touchscreen
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/737/head:pull/737
$ git checkout pull/737
Update a local copy of the PR:
$ git checkout pull/737
$ git pull https://git.openjdk.java.net/jfx pull/737/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 737
View PR using the GUI difftool:
$ git pr show -t 737
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/737.diff
:wave: Welcome back alexsch! A progress list of the required criteria for merging this PR into master
will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
I see that this fix is limited to Monocle. Maybe @johanvos can review.
The fix also fixes the first use case described in the JDK-8087370
1. Consider you're touching the screen with two fingers, for example
coordinates of one point is ~100,100 and second point is ~200,200.
While still touching around the same points some events are reported with
one or another point to be either 100,200 or 200,100.
@AlexanderScherbatiy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@AlexanderScherbatiy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
Could you review the simple fix?
@AlexanderScherbatiy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@AlexanderScherbatiy This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open
pull request command.