RFR: 8283215: [macos] Screen Magnifier: Getting java.awt.IllegalComponentStateException when menu item is selected
Sergey Bylokhov
serb at openjdk.java.net
Tue Mar 29 02:50:42 UTC 2022
On Mon, 28 Mar 2022 22:31:31 GMT, Alexander Zuev <kizune at openjdk.org> 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
More information about the client-libs-dev
mailing list