From unknown Sun Jun 15 08:45:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31440: Can't redefine parent-frame on NS Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 May 2018 09:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 31440@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.152620447015893 (code B ref -1); Sun, 13 May 2018 09:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 May 2018 09:41:10 +0000 Received: from localhost ([127.0.0.1]:60186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHnV8-00048H-8a for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHnV6-000485-E3 for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHnV0-00089q-Fg for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59897) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fHnV0-00089V-At for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHnUz-0005hH-1u for bug-gnu-emacs@gnu.org; Sun, 13 May 2018 05:41:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHnUy-000888-1V for bug-gnu-emacs@gnu.org; Sun, 13 May 2018 05:41:01 -0400 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:38974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHnUx-00087t-OJ for bug-gnu-emacs@gnu.org; Sun, 13 May 2018 05:40:59 -0400 Received: by mail-wr0-x231.google.com with SMTP id q3-v6so9260951wrj.6 for ; Sun, 13 May 2018 02:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=oaZV7ONT+H58NMDyGXMm+oYb+Qa5RoTwKPIjR6XFBTA=; b=JKZmTEIUoHbZdroJkwHkcYj7BEOgZI5GWhi/0RiPGfxsQkY+nxW0XlI50Z9bCuco6c w15hQZAG0N0x+kKDGYooCLdcxBJjmFOeDCYlfpLeNUAjLbxzifLmb+VTY8NlBCZTJl6z TgOpL3Btk9/yvtRafzKQomhGF94lZqIjl9oeUmz9amEu+11nS+px0CA6+GwqCpr0OeCy DTwBUAfuOAaCrVJEmZ+R9Uqf0WijwbzKwTR/YYXFLAvcQKQMZLLoj8uRgS3c+OLvEDzD 6RHML4cuFSbyFM1dgxyfe4PHsB+simLJDq9pY9Ntlv+Q9hKr7KIoCy+8dqcvNR3VtoOz /BTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :mime-version:content-disposition:content-transfer-encoding :user-agent; bh=oaZV7ONT+H58NMDyGXMm+oYb+Qa5RoTwKPIjR6XFBTA=; b=OIB+UUZzNSD2sfoZMB22V4nt1ZU8yehEE9RTXysSCWCbPHqSSFGeuJHJXlFjBhdWF5 un7Bjb7ohCXNylz4s7ULZYlsDhIQl4Ro8x40q2Xp2fvVpitNUlbcISU0Ez7IY44Qj/Zb Q68PEaRdgXL01Kl0TIZndwPPVIwt35sp9oESEo9l1dLuglPSRgbIJ2CCJXbpUEoMYJLY sJq4zGshysqYehn76BeqZPgWz8xwtxNarBTjUBxlCXshCkvmUMOVCmU6D35jKkNuqlAS Tuu8JLmNcfxicW4i+11oQ8f2czzHrh9HMPZo04cwEWOoeS0UA1nbgksCsChDoBTkOT2H /jkw== X-Gm-Message-State: ALKqPwdCkFkxtalscQBgwifRbzvEP4RPuURhFz/XLKSfHH1Rdb2XuRXL So915OwrybKAqIKViMxm1bJGOZx0 X-Google-Smtp-Source: AB8JxZpybB3FeIO6/MR/Cp1NlBwvzr4NtPhTE6ZPQx3MdbeChJer9sdpAy6FXSGAUzasN1ykQZBAyw== X-Received: by 2002:adf:a075:: with SMTP id l50-v6mr4262142wrl.227.1526204458156; Sun, 13 May 2018 02:40:58 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-3195-ed66-b02d-6c9f.holly.idiocy.org. [2001:8b0:3f8:8129:3195:ed66:b02d:6c9f]) by smtp.gmail.com with ESMTPSA id q34-v6sm8898757wrb.27.2018.05.13.02.40.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 May 2018 02:40:56 -0700 (PDT) Date: Sun, 13 May 2018 10:40:54 +0100 From: Alan Third Message-ID: <20180513094054.GA15823@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.9.3 (2018-01-21) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) --AhhlLboLdkugWU4S Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit from emacs -Q: set up three frames, a, b and c: (set-frame-parameter c 'parent-frame a) c becomes child of a. (set-frame-parameter c 'parent-frame b) expected: c becomes child of b and is no longer child of a. actual: c remains child of a, and b now cannot be raised above a and b. (set-frame-parameter c 'parent-frame nil) expected: c ceases to be a child frame. actual: emacs crashes. Patch attached. If this is too late for 26.1 I don’t think that will be a huge issue as it seems redefining parent-frame is not something people want to do, and it’s unlikely to be something a user does by accident. -- Alan Third --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Fix-redefinition-of-child-frames-on-NS.patch" >From a33d6248a7369fc18111e42b6157a6bf84c5578a Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 13 May 2018 10:33:44 +0100 Subject: [PATCH] Fix redefinition of child frames on NS * src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing parent frame, remove it. --- src/nsterm.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index c8ae31abc0..df883346de 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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); -- 2.16.1 --AhhlLboLdkugWU4S-- From unknown Sun Jun 15 08:45:15 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alan Third Subject: bug#31440: closed (Re: bug#31440: Can't redefine parent-frame on NS) Message-ID: References: <20180513094054.GA15823@breton.holly.idiocy.org> X-Gnu-PR-Message: they-closed 31440 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 31440@debbugs.gnu.org Date: Sun, 03 Jun 2018 19:35:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1528054502-6458-1" This is a multi-part message in MIME format... ------------=_1528054502-6458-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #31440: Can't redefine parent-frame on NS which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 31440@debbugs.gnu.org. --=20 31440: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D31440 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1528054502-6458-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 31440-done) by debbugs.gnu.org; 3 Jun 2018 19:34:32 +0000 Received: from localhost ([127.0.0.1]:60568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPYls-0001fJ-Da for submit@debbugs.gnu.org; Sun, 03 Jun 2018 15:34:32 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPYlq-0001f3-0B for 31440-done@debbugs.gnu.org; Sun, 03 Jun 2018 15:34:30 -0400 Received: by mail-wm0-f43.google.com with SMTP id l1-v6so10836812wmb.2 for <31440-done@debbugs.gnu.org>; Sun, 03 Jun 2018 12:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=kbtLsIH6jmJr0AikghQ5wi27dHuCeSCLxWZuQGgbwfs=; b=PyoMIIndca/gNU/kzFl64DnS6ciwmAJUDKN16BWfuppU1HkZlKG9rOtYcAxs+P5CBy smwcaCpXyEpLALrnzJtmV9x016CFtoRFnnl+XltyO9qIWYUtdKWSu6EIy6QgO+ZeLKiJ /Wb6ooHIWW2WS9u1MqnmJTRSBy6nckqfMaVZVs1rJJIlfSHQoq5I8uSrdxnhDglS1CaQ GIRq8lwaIqWrdmp2oJOz49ZQ+Pr97Ln07n9lbrlSxtFyGmDw7CJ3jHSw260IXbDoBlGQ 0hfR5TfTrPzyD/8DsMkHYPFp6ze9v3zUnxFqwsE7y9bb6wXuh+eiKieHSL/2Tb98zJ6L ymEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=kbtLsIH6jmJr0AikghQ5wi27dHuCeSCLxWZuQGgbwfs=; b=lhfdJoR6EWkMIb4TWMiNC41xfeyUSQezetr1G/zW8QTNrCy+6Cfx56ak9eUG5b6S7s dmgsw6nZAXncDK+gjrjPCxb8IX7jQdnhe16BYXy7ixNA7u7+skT69f1Qcs4fGBWp6QgL P1tHDTr18w1IV3Gvgpv6zLrl4bI/i459RgnJ2OU8FMmGOHAJi4ujXAMwQFp+8tcpPWBR 2HJ8y+SKhCRMLGe2Wrt/NBiqXq509lgOKcZrG5TnWG4BTagvkq8x/gy1HVYFVTg8ss/b TOqs4Jd0iWd75SUV/w9S55KjML0k2I1xZ4g6tKNfLMuD5gcK7JR7E26+Sj7XiYUJ7d7j hTMw== X-Gm-Message-State: APt69E1gy00xM8SLLjFl97D2ArzeHs48XAmhYQc5O6B2S0V0LTRjSKLI fGv2KEX1dO985RdEdzJi/zVRpmba0Tg= X-Google-Smtp-Source: ADUXVKK9loEuGLp6lLOXgT6GDIxCZhO4hYV4rAYrTDgxY10dUXeo7bgxz45iYgxt3JuAIXFhUPC2tg== X-Received: by 2002:a1c:59c4:: with SMTP id n187-v6mr7605575wmb.51.1528054464088; Sun, 03 Jun 2018 12:34:24 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-acd0-c556-d8b1-5ceb.holly.idiocy.org. [2001:8b0:3f8:8129:acd0:c556:d8b1:5ceb]) by smtp.gmail.com with ESMTPSA id g205-v6sm9347802wmg.43.2018.06.03.12.34.23 for <31440-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Jun 2018 12:34:23 -0700 (PDT) From: Alan Third To: 31440-done@debbugs.gnu.org Subject: Re: bug#31440: Can't redefine parent-frame on NS References: <20180513094054.GA15823@breton.holly.idiocy.org> Date: Sun, 03 Jun 2018 20:34:22 +0100 In-Reply-To: <20180513094054.GA15823@breton.holly.idiocy.org> (Alan Third's message of "Sun, 13 May 2018 10:40:54 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 31440-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Alan Third writes: > Patch attached. > > If this is too late for 26.1 I don=E2=80=99t think that will be a huge is= sue > as it seems redefining parent-frame is not something people want to > do, and it=E2=80=99s unlikely to be something a user does by accident. Pushed to Emacs 26.2. --=20 Alan Third ------------=_1528054502-6458-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 May 2018 09:41:10 +0000 Received: from localhost ([127.0.0.1]:60186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHnV8-00048H-8a for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fHnV6-000485-E3 for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHnV0-00089q-Fg for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59897) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fHnV0-00089V-At for submit@debbugs.gnu.org; Sun, 13 May 2018 05:41:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHnUz-0005hH-1u for bug-gnu-emacs@gnu.org; Sun, 13 May 2018 05:41:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHnUy-000888-1V for bug-gnu-emacs@gnu.org; Sun, 13 May 2018 05:41:01 -0400 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:38974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHnUx-00087t-OJ for bug-gnu-emacs@gnu.org; Sun, 13 May 2018 05:40:59 -0400 Received: by mail-wr0-x231.google.com with SMTP id q3-v6so9260951wrj.6 for ; Sun, 13 May 2018 02:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=oaZV7ONT+H58NMDyGXMm+oYb+Qa5RoTwKPIjR6XFBTA=; b=JKZmTEIUoHbZdroJkwHkcYj7BEOgZI5GWhi/0RiPGfxsQkY+nxW0XlI50Z9bCuco6c w15hQZAG0N0x+kKDGYooCLdcxBJjmFOeDCYlfpLeNUAjLbxzifLmb+VTY8NlBCZTJl6z TgOpL3Btk9/yvtRafzKQomhGF94lZqIjl9oeUmz9amEu+11nS+px0CA6+GwqCpr0OeCy DTwBUAfuOAaCrVJEmZ+R9Uqf0WijwbzKwTR/YYXFLAvcQKQMZLLoj8uRgS3c+OLvEDzD 6RHML4cuFSbyFM1dgxyfe4PHsB+simLJDq9pY9Ntlv+Q9hKr7KIoCy+8dqcvNR3VtoOz /BTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :mime-version:content-disposition:content-transfer-encoding :user-agent; bh=oaZV7ONT+H58NMDyGXMm+oYb+Qa5RoTwKPIjR6XFBTA=; b=OIB+UUZzNSD2sfoZMB22V4nt1ZU8yehEE9RTXysSCWCbPHqSSFGeuJHJXlFjBhdWF5 un7Bjb7ohCXNylz4s7ULZYlsDhIQl4Ro8x40q2Xp2fvVpitNUlbcISU0Ez7IY44Qj/Zb Q68PEaRdgXL01Kl0TIZndwPPVIwt35sp9oESEo9l1dLuglPSRgbIJ2CCJXbpUEoMYJLY sJq4zGshysqYehn76BeqZPgWz8xwtxNarBTjUBxlCXshCkvmUMOVCmU6D35jKkNuqlAS Tuu8JLmNcfxicW4i+11oQ8f2czzHrh9HMPZo04cwEWOoeS0UA1nbgksCsChDoBTkOT2H /jkw== X-Gm-Message-State: ALKqPwdCkFkxtalscQBgwifRbzvEP4RPuURhFz/XLKSfHH1Rdb2XuRXL So915OwrybKAqIKViMxm1bJGOZx0 X-Google-Smtp-Source: AB8JxZpybB3FeIO6/MR/Cp1NlBwvzr4NtPhTE6ZPQx3MdbeChJer9sdpAy6FXSGAUzasN1ykQZBAyw== X-Received: by 2002:adf:a075:: with SMTP id l50-v6mr4262142wrl.227.1526204458156; Sun, 13 May 2018 02:40:58 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-3195-ed66-b02d-6c9f.holly.idiocy.org. [2001:8b0:3f8:8129:3195:ed66:b02d:6c9f]) by smtp.gmail.com with ESMTPSA id q34-v6sm8898757wrb.27.2018.05.13.02.40.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 May 2018 02:40:56 -0700 (PDT) Date: Sun, 13 May 2018 10:40:54 +0100 From: Alan Third To: bug-gnu-emacs@gnu.org Subject: Can't redefine parent-frame on NS Message-ID: <20180513094054.GA15823@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.9.3 (2018-01-21) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) --AhhlLboLdkugWU4S Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit from emacs -Q: set up three frames, a, b and c: (set-frame-parameter c 'parent-frame a) c becomes child of a. (set-frame-parameter c 'parent-frame b) expected: c becomes child of b and is no longer child of a. actual: c remains child of a, and b now cannot be raised above a and b. (set-frame-parameter c 'parent-frame nil) expected: c ceases to be a child frame. actual: emacs crashes. Patch attached. If this is too late for 26.1 I don’t think that will be a huge issue as it seems redefining parent-frame is not something people want to do, and it’s unlikely to be something a user does by accident. -- Alan Third --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Fix-redefinition-of-child-frames-on-NS.patch" >From a33d6248a7369fc18111e42b6157a6bf84c5578a Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 13 May 2018 10:33:44 +0100 Subject: [PATCH] Fix redefinition of child frames on NS * src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing parent frame, remove it. --- src/nsterm.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index c8ae31abc0..df883346de 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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); -- 2.16.1 --AhhlLboLdkugWU4S-- ------------=_1528054502-6458-1--