RFR: 8324941: POC for Headless platform for JavaFX [v4]

Johan Vos jvos at openjdk.org
Fri Jul 18 07:26:59 UTC 2025


On Fri, 27 Jun 2025 19:08:48 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Process reviewer comments
>
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/headless/HeadlessRobot.java line 109:
> 
>> 107:         }
>> 108:         int modifiers = 0;
>> 109:         view.notifyMouse(mouseEvent, buttonEvent, (int)mouseX-wx, (int)mouseY-wy, (int)mouseX, (int)mouseY, modifiers, false, false);
> 
> should the coordinates be rounded instead of floor'ed (cast to int)?
> (also in other places below)

>From a logical point, I would say yes. However, if you look at the Robot implementations for e.g. GTK, there are casts to int as well. So in order to be consistent, I think we should cast to int (and floor, indeed).

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1836#discussion_r2215229975


More information about the openjfx-dev mailing list