On Mon, 28 Mar 2022 22:31:31 GMT, Alexander Zuev <[email protected]> wrote:

> Check parent component visibility status before asking it for its screen 
> coordinates.

src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line 472:

> 470:         return invokeAndWait(new Callable<Accessible>() {
> 471:             public Accessible call() throws Exception {
> 472:                 if (parent == null || !parent.isVisible()) {

Should the `isShowing` be used here to check containers up to the top level? 
But I think it should be possible to create a test that may trigger an 
exception in `getLocationOnScreen()` after the check, so maybe try/catch will 
be a better approach.

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

PR: https://git.openjdk.java.net/jdk/pull/8008

Reply via email to