aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2018-05-13 10:33:44 +0100
committerAlan Third2018-06-02 15:31:59 +0100
commitde6a876373fde7f44f44fb46a29fcdda1d0793ba (patch)
tree7ffeae39db4d43a74d7f115c68bef3e71148a0c4 /src
parent4cfe5312c85130ea9ea0b379923c0ef6b190df77 (diff)
downloademacs-de6a876373fde7f44f44fb46a29fcdda1d0793ba.tar.gz
emacs-de6a876373fde7f44f44fb46a29fcdda1d0793ba.zip
Fix redefinition of child frames on NS
* src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing parent frame, remove it.
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index c8ae31abc09..df883346dee 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1958,12 +1958,20 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
1958 1958
1959 if (p != FRAME_PARENT_FRAME (f)) 1959 if (p != FRAME_PARENT_FRAME (f))
1960 { 1960 {
1961 parent = [FRAME_NS_VIEW (p) window]; 1961 block_input ();
1962 child = [FRAME_NS_VIEW (f) window]; 1962 child = [FRAME_NS_VIEW (f) window];
1963 1963
1964 block_input (); 1964 if ([child parentWindow] != nil)
1965 [parent addChildWindow: child 1965 [[child parentWindow] removeChildWindow:child];
1966 ordered: NSWindowAbove]; 1966
1967 if (!NILP (new_value))
1968 {
1969 parent = [FRAME_NS_VIEW (p) window];
1970
1971 [parent addChildWindow: child
1972 ordered: NSWindowAbove];
1973 }
1974
1967 unblock_input (); 1975 unblock_input ();
1968 1976
1969 fset_parent_frame (f, new_value); 1977 fset_parent_frame (f, new_value);