diff options
| author | Glenn Morris | 2018-06-04 09:25:22 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-06-04 09:25:22 -0700 |
| commit | b12333f122eecf491ffb88a8410432bf62c22cbc (patch) | |
| tree | 26282463382da2d536c289cbe5aaace549d17c19 /src | |
| parent | 5e307525b907601ccda2a7914fea898366b25b91 (diff) | |
| parent | defd53a56c709b8b8c736f0ab3b594490216d300 (diff) | |
| download | emacs-b12333f122eecf491ffb88a8410432bf62c22cbc.tar.gz emacs-b12333f122eecf491ffb88a8410432bf62c22cbc.zip | |
Merge from origin/emacs-26
defd53a Set accessibility subroles for child frame (bug#31324)
de6a876 Fix redefinition of child frames on NS
Diffstat (limited to 'src')
| -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 | |||
| 2016 | 2016 | ||
| 2017 | if (p != FRAME_PARENT_FRAME (f)) | 2017 | if (p != FRAME_PARENT_FRAME (f)) |
| 2018 | { | 2018 | { |
| 2019 | parent = [FRAME_NS_VIEW (p) window]; | 2019 | block_input (); |
| 2020 | child = [FRAME_NS_VIEW (f) window]; | 2020 | child = [FRAME_NS_VIEW (f) window]; |
| 2021 | 2021 | ||
| 2022 | block_input (); | 2022 | if ([child parentWindow] != nil) |
| 2023 | [parent addChildWindow: child | 2023 | { |
| 2024 | ordered: NSWindowAbove]; | 2024 | [[child parentWindow] removeChildWindow:child]; |
| 2025 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000 | ||
| 2026 | #if MAC_OS_X_VERSION_MIN_REQUIRED < 101000 | ||
| 2027 | if ([child respondsToSelector:@selector(setAccessibilitySubrole:)] | ||
| 2028 | #endif | ||
| 2029 | [child setAccessibilitySubrole:NSAccessibilityStandardWindowSubrole]; | ||
| 2030 | #endif | ||
| 2031 | } | ||
| 2032 | |||
| 2033 | if (!NILP (new_value)) | ||
| 2034 | { | ||
| 2035 | parent = [FRAME_NS_VIEW (p) window]; | ||
| 2036 | |||
| 2037 | [parent addChildWindow: child | ||
| 2038 | ordered: NSWindowAbove]; | ||
| 2039 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000 | ||
| 2040 | #if MAC_OS_X_VERSION_MIN_REQUIRED < 101000 | ||
| 2041 | if ([child respondsToSelector:@selector(setAccessibilitySubrole:)] | ||
| 2042 | #endif | ||
| 2043 | [child setAccessibilitySubrole:NSAccessibilityFloatingWindowSubrole]; | ||
| 2044 | #endif | ||
| 2045 | } | ||
| 2046 | |||
| 2025 | unblock_input (); | 2047 | unblock_input (); |
| 2026 | 2048 | ||
| 2027 | fset_parent_frame (f, new_value); | 2049 | fset_parent_frame (f, new_value); |