On Fri, 24 Jan 2025 18:51:04 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Alisen Chung has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   init finX, finY
>
> src/java.desktop/share/classes/java/awt/Robot.java line 253:
> 
>> 251:                 leastXDiff = currXDiff;
>> 252:                 leastYDiff = currYDiff;
>> 253:             }
> 
> Both branches must be executed at the same time — you have adjust both 
> <var>x</var> and <var>y</var> if the diff isn't 0.
> 
> Probably, min/max would work better here too.

I changed the algorithm to keep track of the closest screen in the x direction 
and the closest screen in the y direction, then at the end choose the closer 
screen between x and y distances

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22781#discussion_r1932987627

Reply via email to