aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2018-05-13 11:02:00 +0100
committerAlan Third2018-06-02 15:31:59 +0100
commitdefd53a56c709b8b8c736f0ab3b594490216d300 (patch)
tree7a49539047f9f36b05ab1fa970a37894d9f66778 /src
parentde6a876373fde7f44f44fb46a29fcdda1d0793ba (diff)
downloademacs-defd53a56c709b8b8c736f0ab3b594490216d300.tar.gz
emacs-defd53a56c709b8b8c736f0ab3b594490216d300.zip
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')
-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
1962 child = [FRAME_NS_VIEW (f) window]; 1962 child = [FRAME_NS_VIEW (f) window];
1963 1963
1964 if ([child parentWindow] != nil) 1964 if ([child parentWindow] != nil)
1965 [[child parentWindow] removeChildWindow:child]; 1965 {
1966 [[child parentWindow] removeChildWindow:child];
1967#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
1968#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
1969 if ([child respondsToSelector:@selector(setAccessibilitySubrole:)]
1970#endif
1971 [child setAccessibilitySubrole:NSAccessibilityStandardWindowSubrole];
1972#endif
1973 }
1966 1974
1967 if (!NILP (new_value)) 1975 if (!NILP (new_value))
1968 { 1976 {
@@ -1970,6 +1978,12 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
1970 1978
1971 [parent addChildWindow: child 1979 [parent addChildWindow: child
1972 ordered: NSWindowAbove]; 1980 ordered: NSWindowAbove];
1981#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
1982#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
1983 if ([child respondsToSelector:@selector(setAccessibilitySubrole:)]
1984#endif
1985 [child setAccessibilitySubrole:NSAccessibilityFloatingWindowSubrole];
1986#endif
1973 } 1987 }
1974 1988
1975 unblock_input (); 1989 unblock_input ();