On Sat, 25 Dec 2021 17:38:49 GMT, Aleksandr Veselov <[email protected]> 
wrote:

>> Perform scaling while converting sizes and coordinates to provide correct 
>> positions of accessible elements on HiDPI screen and make hit-test work 
>> properly. It uses FontRenderContext to receive display scale without API 
>> changes.
>
> Aleksandr Veselov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Pick graphics configuration from env instead of using FRC

src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
 line 7363:

> 7361:          * @param  current the default configuration which is checked 
> in the first
> 7362:          *         place
> 7363:          * @param  x the x coordinate of the given point

Please specify in which space the coordinates are expected.

src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
 line 7369:

> 7367:         public static GraphicsConfiguration 
> getGraphicsConfigurationAtPoint(
> 7368:                 GraphicsConfiguration current, double x, double y) {
> 7369:             if (current.getBounds().contains(x, y)) {

Here you do not translate the bounds to device space. Actually, I'd remove this 
check at all, as below you duplicate it. Also, when you call the method you 
pass the default GC, so it seems it does not bring much profit...

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

PR: https://git.openjdk.java.net/jdk18/pull/72

Reply via email to