diff options
author | Alan Third <alan@idiocy.org> | 2018-05-13 10:33:44 +0100 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2018-06-02 15:31:59 +0100 |
commit | de6a876373fde7f44f44fb46a29fcdda1d0793ba (patch) | |
tree | 7ffeae39db4d43a74d7f115c68bef3e71148a0c4 /src/nsterm.m | |
parent | 4cfe5312c85130ea9ea0b379923c0ef6b190df77 (diff) | |
download | emacs-de6a876373fde7f44f44fb46a29fcdda1d0793ba.tar.gz |
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/nsterm.m')
-rw-r--r-- | src/nsterm.m | 16 |
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 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 (!NILP (new_value)) + { + parent = [FRAME_NS_VIEW (p) window]; + + [parent addChildWindow: child + ordered: NSWindowAbove]; + } + unblock_input (); fset_parent_frame (f, new_value); |