GNU bug report logs - #77079
31.0.50; Re-parenting tty child frame leaves two instances on display

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Mon, 17 Mar 2025 18:53:05 UTC

Severity: normal

Found in version 31.0.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77079 in the body.
You can then email your comments to 77079 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77079; Package emacs. (Mon, 17 Mar 2025 18:53:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 17 Mar 2025 18:53:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Subject: 31.0.50; Re-parenting tty child frame leaves two instances on display
Date: Mon, 17 Mar 2025 19:52:41 +0100
I think we need the following change

diff --git a/src/frame.c b/src/frame.c
index c1ef26e5dd4..9a4ca7d0682 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3706,6 +3706,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
       if (NILP (f->parent_frame) != NILP (val))
 	error ("Making a root frame a child or vice versa is not supported");
       f->parent_frame = val;
+      SET_FRAME_GARBAGED (root_frame (f));
     }

   /* The tty color needed to be set before the frame's parameter

since otherwise re-parenting a child frame, for example, using

(set-frame-parameter tty-3 'parent-frame tty-1)

from my earlier tty-child-frames.el leaves one with two instances of the
child frame on display.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77079; Package emacs. (Mon, 17 Mar 2025 19:52:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: Re: 31.0.50; Re-parenting tty child frame leaves two instances on
 display
Date: Mon, 17 Mar 2025 20:50:52 +0100
martin rudalics <rudalics <at> gmx.at> writes:

> I think we need the following change
>
> diff --git a/src/frame.c b/src/frame.c
> index c1ef26e5dd4..9a4ca7d0682 100644
> --- a/src/frame.c
> +++ b/src/frame.c
> @@ -3706,6 +3706,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
>         if (NILP (f->parent_frame) != NILP (val))
>   	error ("Making a root frame a child or vice versa is not supported");
>         f->parent_frame = val;
> +      SET_FRAME_GARBAGED (root_frame (f));
>       }
>
>     /* The tty color needed to be set before the frame's parameter
>
> since otherwise re-parenting a child frame, for example, using
>
> (set-frame-parameter tty-3 'parent-frame tty-1)
>
> from my earlier tty-child-frames.el leaves one with two instances of the
> child frame on display.
>
> martin

Yep, for sure.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77079; Package emacs. (Tue, 18 Mar 2025 09:03:04 GMT) Full text and rfc822 format available.

Message #11 received at 77079 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 77079 <at> debbugs.gnu.org
Subject: Re: 31.0.50; Re-parenting tty child frame leaves two instances on
 display
Date: Tue, 18 Mar 2025 10:02:09 +0100
>> I think we need the following change
>>
>> diff --git a/src/frame.c b/src/frame.c
>> index c1ef26e5dd4..9a4ca7d0682 100644
>> --- a/src/frame.c
>> +++ b/src/frame.c
>> @@ -3706,6 +3706,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
>>          if (NILP (f->parent_frame) != NILP (val))
>>    	error ("Making a root frame a child or vice versa is not supported");
>>          f->parent_frame = val;
>> +      SET_FRAME_GARBAGED (root_frame (f));
>>        }
>>
>>      /* The tty color needed to be set before the frame's parameter
>>
>> since otherwise re-parenting a child frame, for example, using
>>
>> (set-frame-parameter tty-3 'parent-frame tty-1)
>>
>> from my earlier tty-child-frames.el leaves one with two instances of the
>> child frame on display.
>>
>> martin
>
> Yep, for sure.

Installed with the additional twist that I now garbage the old and new
root frame to handle a scenario where I make the child frames tty-1,
tty-2 on the selected frame and then do

(setq tty-0 (make-frame))
(set-frame-parameter tty-1 'parent-frame tty-0)
(set-frame-parameter tty-2 'parent-frame tty-1)

martin




Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Wed, 19 Mar 2025 08:44:05 GMT) Full text and rfc822 format available.

Notification sent to martin rudalics <rudalics <at> gmx.at>:
bug acknowledged by developer. (Wed, 19 Mar 2025 08:44:05 GMT) Full text and rfc822 format available.

Message #16 received at 77079-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 77079-done <at> debbugs.gnu.org
Subject: Re: 31.0.50; Re-parenting tty child frame leaves two instances on
 display
Date: Wed, 19 Mar 2025 09:43:24 +0100
Closing this bug.

martin





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Apr 2025 11:24:22 GMT) Full text and rfc822 format available.

This bug report was last modified 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.