src/macosx/classes/sun/lwawt/macosx/CAccessibility.java

Print this page

        

*** 69,81 **** private CAccessibility() { KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener("focusOwner", this); } public void propertyChange(final PropertyChangeEvent evt) { ! if (evt.getNewValue() == null) return; focusChanged(); } private native void focusChanged(); static <T> T invokeAndWait(final Callable<T> callable, final Component c) { try { --- 69,93 ---- private CAccessibility() { KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener("focusOwner", this); } public void propertyChange(final PropertyChangeEvent evt) { ! Object newValue = evt.getNewValue(); ! if (newValue == null) return; ! // Don't post focus on things that don't matter, i.e. alert, colorchooser, ! // desktoppane, dialog, directorypane, filechooser, filler, fontchoose, ! // frame, glasspane, layeredpane, optionpane, panel, rootpane, separator, ! // tooltip, viewport, window. ! // List taken from initializeRoles() in JavaComponentUtilities.m. ! if (newValue instanceof Accessible) { ! AccessibleContext nvAC = ((Accessible) newValue).getAccessibleContext(); ! AccessibleRole nvRole = nvAC.getAccessibleRole(); ! if (!ignoredRoles.contains(roleKey(nvRole))) { focusChanged(); } + } + } private native void focusChanged(); static <T> T invokeAndWait(final Callable<T> callable, final Component c) { try {
*** 700,712 **** final AccessibleContext context = child.getAccessibleContext(); if (context == null) continue; if (whichChildren == JAVA_AX_VISIBLE_CHILDREN) { ! if (!context.getAccessibleComponent().isVisible()) continue; } else if (whichChildren == JAVA_AX_SELECTED_CHILDREN) { ! if (!ac.getAccessibleSelection().isAccessibleChildSelected(i)) continue; } if (!allowIgnored) { final AccessibleRole role = context.getAccessibleRole(); if (role != null && ignoredRoles != null && ignoredRoles.contains(roleKey(role))) { --- 712,730 ---- final AccessibleContext context = child.getAccessibleContext(); if (context == null) continue; if (whichChildren == JAVA_AX_VISIBLE_CHILDREN) { ! AccessibleComponent acomp = context.getAccessibleComponent(); ! if (acomp == null || !acomp.isVisible()) { ! continue; ! } } else if (whichChildren == JAVA_AX_SELECTED_CHILDREN) { ! AccessibleSelection sel = ac.getAccessibleSelection(); ! if (sel == null || !sel.isAccessibleChildSelected(i)) { ! continue; ! } } if (!allowIgnored) { final AccessibleRole role = context.getAccessibleRole(); if (role != null && ignoredRoles != null && ignoredRoles.contains(roleKey(role))) {