summaryrefslogtreecommitdiff
path: root/src/nsterm.m
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2018-05-13 11:02:00 +0100
committerAlan Third <alan@idiocy.org>2018-06-02 15:31:59 +0100
commitdefd53a56c709b8b8c736f0ab3b594490216d300 (patch)
tree7a49539047f9f36b05ab1fa970a37894d9f66778 /src/nsterm.m
parentde6a876373fde7f44f44fb46a29fcdda1d0793ba (diff)
downloademacs-defd53a56c709b8b8c736f0ab3b594490216d300.tar.gz
Set accessibility subroles for child frame (bug#31324)
; Depends on patch in bug#31440. * src/nsterm.m (x_set_parent_frame): Set subrole depending on whether frame is a child or not.
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index df883346dee..e4a9b014f49 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1962,7 +1962,15 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
child = [FRAME_NS_VIEW (f) window];
if ([child parentWindow] != nil)
- [[child parentWindow] removeChildWindow:child];
+ {
+ [[child parentWindow] removeChildWindow:child];
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+ if ([child respondsToSelector:@selector(setAccessibilitySubrole:)]
+#endif
+ [child setAccessibilitySubrole:NSAccessibilityStandardWindowSubrole];
+#endif
+ }
if (!NILP (new_value))
{
@@ -1970,6 +1978,12 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
[parent addChildWindow: child
ordered: NSWindowAbove];
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+ if ([child respondsToSelector:@selector(setAccessibilitySubrole:)]
+#endif
+ [child setAccessibilitySubrole:NSAccessibilityFloatingWindowSubrole];
+#endif
}
unblock_input ();