RFR: 8307779: Relax the java.awt.Robot specification [v2]
Alexander Zvegintsev
azvegint at openjdk.org
Wed May 10 13:57:00 UTC 2023
On Wed, 10 May 2023 12:54:37 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Alexander Zvegintsev has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - rephrase wording about mouse pointer may not visually move
>> - Remove mention of mouse cursor for screen capture
>
> src/java.desktop/share/classes/java/awt/Robot.java line 231:
>
>> 229: * @implNote the mouse pointer may not visually move on Linux systems
>> 230: * using Wayland, while the subsequent mousePress and mouseRelease
>> 231: * can be delivered to the correct location
>
> Since Wayland is an example, maybe say something more like this?
>
> "...may not visually move on some platforms, such as Linux systems using Wayland..."
Updated.
Probably this can be covered by the line 80:
`<li> ignoring or limiting specific requests for Robot generated (synthesized) events related to keyboard and mouse etc.</li>`
> src/java.desktop/share/classes/java/awt/Robot.java line 431:
>
>> 429: * to capture screen content, and the required permissions are not granted,
>> 430: * then a {@code SecurityException} may be thrown,
>> 431: * or the content of the returned {@code Color} is undefined.
>
> Given that a `SecurityException` is only thrown on some platforms, is it worth throwing at all? Undefined colors can still occur, so I'm not sure I see much value in an exception. What do you envision that an application would do with the exception?
I agree, I'll try to come up with something less confusing.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13809#discussion_r1189921904
PR Review Comment: https://git.openjdk.org/jdk/pull/13809#discussion_r1189941047
More information about the client-libs-dev
mailing list