RFR: 8262023: Scrolled button is pressed using Monocle on Raspberry Pi with Touchscreen
Kevin Rushforth
kcr at openjdk.java.net
Fri Feb 19 20:40:45 UTC 2021
On Fri, 19 Feb 2021 17:50:01 GMT, Alexander Scherbatiy <alexsch at openjdk.org> wrote:
>> 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 even with `-Dgtk.com.sun.javafx.gestures.scroll=true` option)
>> [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
>
> May be it has sense to add a drag event handler (which disarms the corresponding button) to ButtonBehavior only if javafx.platform is set to monocle to localize the fix only for Monocle? Or add a separate property and set it by default to true on Monocle and to false otherwise?
That would certainly be a safer (more targeted) fix. I'd like to hear from @jperedadnr and @johanvos on this.
-------------
PR: https://git.openjdk.java.net/jfx/pull/406
More information about the openjfx-dev
mailing list