RFR: 8262023: Scrolled button is pressed using Monocle on Raspberry Pi with Touchscreen
Alexander Scherbatiy
alexsch at openjdk.java.net
Fri Feb 19 16:29:40 UTC 2021
On Fri, 19 Feb 2021 16:12:01 GMT, Alexander Scherbatiy <alexsch at openjdk.org> wrote:
>> Can you provide an automated test for this?
>>
>> Since this is touching common code, what testing have you done to ensure no regressions on other platforms when not using Monocle?
>>
>> This will need careful review and testing.
>
> I have Touchscreen only on Raspberry Pi so I checked the touch events only on JavaFX on arm with Monocle and GTK.
>
> I also checked the fix with ScrollPaneControlsSample on Linux and Windows with ordinary screen and using only mouse (press, release, scroll) and the sample works with and without the fix.
>
> I run all but webkit automated tests with the fix on Ubuntu `gradle test` and they passed.
> I will look the way to provide an automated test.
>
> I am interested if there is a better way to fix this. Handling scroll event would be straightforward (because the ScrollPane is used) but unfortunately it does not work when two controls are scrolled.
Some more details about handled events in ScrollPaneSample
Monocle.
Touch and release a button (press a button by touching the screen)
[button behavior] MOUSE_ENTERED, Button: 2
[button behavior] MOUSE_PRESSED, Button: 2
[button behavior] MOUSE_RELEASED, Button: 2
Scroll a button:
[button behavior] MOUSE_PRESSED, Button: 3
[button behavior] SCROLL, Button: 3
[button behavior] MOUSE_DRAGGED, Button: 3
[button behavior] SCROLL, Button: 3
[button behavior] MOUSE_DRAGGED, Button: 3
[button behavior] SCROLL, Button: 3
[button behavior] MOUSE_DRAGGED, Button: 3
[button behavior] SCROLL, Button: 3
[button behavior] MOUSE_DRAGGED, Button: 3
[button behavior] MOUSE_RELEASED, Button: 3
Scroll a button that the next button appears under the finger:
[button behavior] MOUSE_ENTERED, Button: 5
[button behavior] MOUSE_PRESSED, Button: 5
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_DRAGGED, Button: 5
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_DRAGGED, Button: 5
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_DRAGGED, Button: 5
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_DRAGGED, Button: 5
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_DRAGGED, Button: 5
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_DRAGGED, Button: 5
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_DRAGGED, Button: 5
[button behavior] MOUSE_RELEASED, Button: 5
Note: all scroll events go to Button 4 but mouse is released on Button 5.
GTK
Touch and release a button (press a button by touching the screen)
[button behavior] MOUSE_PRESSED, Button: 1
[button behavior] MOUSE_DRAGGED, Button: 1
[button behavior] MOUSE_DRAGGED, Button: 1
[button behavior] MOUSE_RELEASED, Button: 1
Note: mouse drag events are generated
Scroll buttons by mouse (scrolling by touch does not work for me on GTK)
[button behavior] MOUSE_EXITED, Button: 3
[button behavior] MOUSE_ENTERED, Button: 4
[button behavior] SCROLL, Button: 4
[button behavior] SCROLL, Button: 4
[button behavior] SCROLL, Button: 4
[button behavior] SCROLL, Button: 4
[button behavior] MOUSE_EXITED, Button: 4
[button behavior] MOUSE_ENTERED, Button: 5
-------------
PR: https://git.openjdk.java.net/jfx/pull/406
More information about the openjfx-dev
mailing list