On Thu, 15 Aug 2024 18:02:33 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

> I looked at 
> `java/awt/Choice/SelectCurrentItemTest/SelectCurrentItemTest.java`, ran it 
> and noticed that the test does not open the popup of the `Choice` component 
> on macOS 14.x.
> 
> If the popup does not open, the test does not verify anything — it always 
> passes.
> 
> I refactored the test and added a mouse listener to the `Choice` component. 
> If mouse click isn't registered, the test fails.
> 
> The updated test fails for me locally on macOS Sonoma 14.5. This is likely 
> the result of [JDK-8322653](https://bugs.openjdk.org/browse/JDK-8322653): 
> _[macos14] : Mouse clicks are not received within 3 pixels of the window 
> boundary_.
> 
> The updated test passes on CI.

test/jdk/java/awt/Choice/SelectCurrentItemTest/SelectCurrentItemTest.java line 
89:

> 87: 
> 88:         frame.setLocationRelativeTo(null);
> 89:         frame.pack();

When frame.setSize() is used, the mouse pointer on the choice drop-down button 
is no longer a resize indicator and the click event is received. But I guess 
you are planning to leave this as-is for now so as to not mask the external 
issue.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20601#discussion_r1719159917

Reply via email to