diff options
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); |