summaryrefslogtreecommitdiff
path: root/vcl/aqua/source
diff options
context:
space:
mode:
authorBoris Dušek <me@dusek.me>2013-07-31 00:08:46 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-01 16:38:14 +0000
commit610a4a9498c78293566e3996a9672269a7f085e2 (patch)
tree7a166de704f3d82c5f211d9d6f3f634e5612f8e9 /vcl/aqua/source
parentce33ac1da4b3345684e69dc0d5adff375fcb4a13 (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>
Diffstat (limited to 'vcl/aqua/source')
-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 ];
}