diff options
author | Glenn Morris <rgm@gnu.org> | 2018-06-04 09:25:22 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-06-04 09:25:22 -0700 |
commit | b12333f122eecf491ffb88a8410432bf62c22cbc (patch) | |
tree | 26282463382da2d536c289cbe5aaace549d17c19 | |
parent | 5e307525b907601ccda2a7914fea898366b25b91 (diff) | |
parent | defd53a56c709b8b8c736f0ab3b594490216d300 (diff) | |
download | emacs-b12333f122eecf491ffb88a8410432bf62c22cbc.tar.gz |
Merge from origin/emacs-26
defd53a Set accessibility subroles for child frame (bug#31324)
de6a876 Fix redefinition of child frames on NS
-rw-r--r-- | src/nsterm.m | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 3c95fedadc9..c0d2d91fde8 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2016,12 +2016,34 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu if (p != FRAME_PARENT_FRAME (f)) { - parent = [FRAME_NS_VIEW (p) window]; + block_input (); child = [FRAME_NS_VIEW (f) window]; - block_input (); - [parent addChildWindow: child - ordered: NSWindowAbove]; + if ([child parentWindow] != nil) + { + [[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)) + { + parent = [FRAME_NS_VIEW (p) window]; + + [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 (); fset_parent_frame (f, new_value); |