summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/a11y/aqua11yfactory.mm
diff options
context:
space:
mode:
authorBoris Dušek <me@dusek.me>2013-07-31 00:08:46 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-08-10 14:51:09 +0000
commit86499a56c2a746bcbde8a7f6b278b0b5ef84ce86 (patch)
tree5fec852d500f035eaa4c08f15d61d498aca62b1f /vcl/aqua/source/a11y/aqua11yfactory.mm
parent96c12d1ad73afa7ca18746c62cf0f4edc9a50b99 (diff)
fdo#67410: VoiceOver does not provide typing or cursor movement echo in text
Change-Id: Ief39aecd247b612c52cd970b6c5911f34d8cb69e Reviewed-on: https://gerrit.libreoffice.org/5208 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz> Reviewed-on: https://gerrit.libreoffice.org/5279 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl/aqua/source/a11y/aqua11yfactory.mm')
-rw-r--r--vcl/aqua/source/a11y/aqua11yfactory.mm27
1 files changed, 27 insertions, 0 deletions
diff --git a/vcl/aqua/source/a11y/aqua11yfactory.mm b/vcl/aqua/source/a11y/aqua11yfactory.mm
index 222fb6c48641..64f178314a38 100644
--- a/vcl/aqua/source/a11y/aqua11yfactory.mm
+++ b/vcl/aqua/source/a11y/aqua11yfactory.mm
@@ -155,6 +155,30 @@ static bool enabled = false;
#endif
{
[ dAllWrapper setObject: aWrapper forKey: nKey ];
+ /* fdo#67410: Accessibility notifications are not delivered on NSView subclasses that do not
+ "reasonably" participate in NSView hierarchy (perhaps the only important point is
+ that the view is a transitive subview of the NSWindow's content view, but I
+ did not try to verify that).
+
+ So let the superview-subviews relationship mirror the AXParent-AXChildren relationship.
+ */
+ id parent = [aWrapper accessibilityAttributeValue:NSAccessibilityParentAttribute];
+ if (parent) {
+ if ([parent isKindOfClass:[NSView class]]) {
+ // SAL_DEBUG("Wrapper INIT: " << [[aWrapper description] UTF8String] << " ==> " << [[parent description] UTF8String]);
+ NSView *parentView = (NSView *)parent;
+ [parentView addSubview:aWrapper positioned:NSWindowBelow relativeTo:nil];
+ } else if ([parent isKindOfClass:NSClassFromString(@"SalFrameWindow")]) {
+ NSWindow *window = (NSWindow *)parent;
+ NSView *salView = [window contentView];
+ // SAL_DEBUG("Wrapper INIT SAL: " << [[aWrapper description] UTF8String] << " ==> " << [[salView description] UTF8String]);
+ [salView addSubview:aWrapper positioned:NSWindowBelow relativeTo:nil];
+ } else {
+ // SAL_DEBUG("Wrapper INIT: !! " << [[aWrapper description] UTF8String] << " !==>! " << [[parent description] UTF8String] << "!!");
+ }
+ } else {
+ // SAL_DEBUG("Wrapper INIT: " << [[aWrapper description] UTF8String] << " ==> NO PARENT");
+ }
}
}
return aWrapper;
@@ -169,6 +193,9 @@ static bool enabled = false;
// TODO: when RADIO_BUTTON search for associated RadioGroup-wrapper and delete that as well
AquaA11yWrapper * theWrapper = [ AquaA11yFactory wrapperForAccessibleContext: rxAccessibleContext createIfNotExists: NO ];
if ( theWrapper != nil ) {
+ if (![theWrapper isKindOfClass:NSClassFromString(@"SalFrameView")]) {
+ [theWrapper removeFromSuperview];
+ }
[ [ AquaA11yFactory allWrapper ] removeObjectForKey: [ AquaA11yFactory keyForAccessibleContext: rxAccessibleContext ] ];
[ theWrapper release ];
}