Fix redefinition of child frames on NS

* src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing
parent frame, remove it.
This commit is contained in:
Alan Third 2018-05-13 10:33:44 +01:00
parent 4cfe5312c8
commit de6a876373

View file

@ -1958,12 +1958,20 @@ so some key presses (TAB) are swallowed by the system. */
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);