[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/aqua

Boris Dušek me at dusek.me
Fri Aug 9 05:56:02 PDT 2013


 vcl/aqua/source/a11y/aqua11yfactory.mm |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

New commits:
commit 4f4d95b86675e6d672e0b36448e4102be0ede339
Author: Boris Dušek <me at dusek.me>
Date:   Wed Jul 31 00:08:46 2013 +0200

    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 at suse.cz>
    Tested-by: Luboš Luňák <l.lunak at suse.cz>
    Reviewed-on: https://gerrit.libreoffice.org/5277
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Tor Lillqvist <tml at iki.fi>

diff --git a/vcl/aqua/source/a11y/aqua11yfactory.mm b/vcl/aqua/source/a11y/aqua11yfactory.mm
index 222fb6c..64f1783 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 ];
     }


More information about the Libreoffice-commits mailing list