diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm index 86bc720..604070e 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm @@ -971,7 +971,9 @@ Reference < XAccessibleContext > hitTestRunner ( com::sun::star::awt::Point poin com::sun::star::awt::Point hitPoint ( point.X - location.X , point.Y - location.Y); Reference < XAccessible > rxAccessible = rxAccessibleComponent -> getAccessibleAtPoint ( hitPoint ); if ( rxAccessible.is() && rxAccessible -> getAccessibleContext().is() ) { - if ( rxAccessible -> getAccessibleContext() -> getAccessibleChildCount() > 0 ) { + if ( rxAccessible->getAccessibleContext() != rxAccessibleContext ) { // hit ourself + hitChild = rxAccessible -> getAccessibleContext(); + } else if ( rxAccessible -> getAccessibleContext() -> getAccessibleChildCount() > 0 ) { hitChild = hitTestRunner ( point, rxAccessible -> getAccessibleContext() ); if ( ! hitChild.is() ) { hitChild = rxAccessible -> getAccessibleContext();