On Fri, 28 Oct 2022 23:42:30 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Johan Vos has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   address reviewer comments
>>   Fix detection on screen, based on awtScale factors
>
> modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 400:
> 
>> 398:             float py = screen.getPlatformY();
>> 399:             newx = sx + (wx - px) * awtScaleX / pScaleX;
>> 400:             newy = sy + (wy - py) * awtScaleY / pScaleY;
> 
> `px` and `py` are already (scaled) "FX" coordinates, so I'm not sure AWT 
> scale should be applied to that. I might be missing something here.

Without this correction, there is an offset on Linux (where awtScaleX = 1 and 
pScaleX =2  for example).
TBH, I think the relations between the different scale factors should be 
written out clearly somewhere, as I think there are a number of places where we 
face platform-specific differences.

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

PR: https://git.openjdk.org/jfx/pull/924

Reply via email to