RFR: 6899304 : java.awt.Toolkit.getScreenInsets(GraphicsConfiguration) returns incorrect values [v8]

Harshitha Onkar honkar at openjdk.org
Fri Jan 31 02:39:57 UTC 2025


On Wed, 29 Jan 2025 12:25:29 GMT, anass baya <duke at openjdk.org> wrote:

>> Screen number 0 is not always the primary screen, so we’ve removed the code that assumes it is.
>> 
>> We used an existing test and took the following considerations into account for Windows:
>> 
>> - On Windows, undecorated maximized frames are placed over the taskbar.
>> - On Windows, the top-left corner of an undecorated maximized frame may have negative coordinates (x, y).
>> - Consider the fractional part after scaling.
>
> anass baya has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add debug output

@anass-baya 
Fix looks good to me.

Initially the test passed without the fix, I realized that I had the option **"Show taskbar on all displays"** checked in Settings, after unchecking it the test works as expected with the fix.

Suggestion: Based on other reviewers opinion you can choose to combine MultiScreenInsetsTest & ScreenInsetsTest. https://github.com/openjdk/jdk/pull/23183#discussion_r1936568297

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

Marked as reviewed by honkar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23183#pullrequestreview-2585552155


More information about the client-libs-dev mailing list