From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Andrey Listopadov <andreyorst@gmail.com>
Cc: 64625@debbugs.gnu.org
Subject: bug#64625: 30.0.50; deleting a focused child frame causes Emacs to ignore all input
Date: Sat, 15 Jul 2023 08:02:36 +0800 [thread overview]
Message-ID: <875y6m9h43.fsf@yahoo.com> (raw)
In-Reply-To: <87ilamtnoe.fsf@gmail.com> (Andrey Listopadov's message of "Fri, 14 Jul 2023 20:12:18 +0300")
Andrey Listopadov <andreyorst@gmail.com> writes:
> Hello.
>
> I've tried making a mode that creates an alternative window manager
> within emacs that uses child frames on an infinite pannable desktop
> instead of window splits. When I've implemented the button that closes
> the window, I've noticed, that when I'm closing the last input, Emacs
> stops recognizing any keyboard events, and the point in the root window
> disappears.
>
> This can be reproduced with the following steps:
>
> 1. Call (make-frame `((parent-frame . ,(selected-frame))))
> 2. Focus the newly created child-frame (with a mouse or elsehow)
> 3. Call C-x 5 0 to kill the frame.
> 4. Try typing or calling M-x in the original Emacs window.
>
> Weirdly enough, the only thing that Emacs responds to and restores the
> focus are the arrow keys. You can also go to File > New Frame menu and
> it will fix the issue for the new frame, but the old one is still
> broken.
>
> Am I supposed to delete focused child-frames in a different way or is it
> a bug? I've tried using `handle-delete-frame' by passing it the list
> that resembles the event the function expects, but no luck. I've also
> tried calling `select-frame' and `select-window' to change focus to the
> root window, but it doesn't help either.
>
>
> In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.38, cairo version 1.17.8) of 2023-07-07 built on toolbox
> Repository revision: 37101780243d083e8773c255242aa26614f22a14
> Repository branch: master
> System Description: Fedora Linux 38 (Container Image)
>
> Configured using:
> 'configure --without-compress-install --with-native-compilation=aot
> --with-pgtk --with-mailutils --with-xwidgets
> --prefix=/var/home/alist/.local'
Thanks. Would you please instrument `pgtk_new_focus_frame' (in
pgtkterm.c) as follows:
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index dc2d6477bb5..d62414f4e50 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -4732,6 +4732,9 @@ pgtk_new_focus_frame (struct pgtk_display_info *dpyinfo, struct frame *frame)
if (frame != dpyinfo->x_focus_frame)
{
+ fprintf (stderr, "pgtk_new_focus_frame: new frame %p, "
+ "with outer widget %p\n", (void *) frame,
+ (void *) FRAME_GTK_OUTER_WIDGET (frame));
/* Set this before calling other routines, so that they see
the correct value of x_focus_frame. */
dpyinfo->x_focus_frame = frame;
and show me what is printed when the child frame is initially focused,
and when you try to focus its parent after it is deleted.
next prev parent reply other threads:[~2023-07-15 0:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 17:12 bug#64625: 30.0.50; deleting a focused child frame causes Emacs to ignore all input Andrey Listopadov
2023-07-15 0:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-07-15 8:28 ` Andrey Listopadov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875y6m9h43.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=64625@debbugs.gnu.org \
--cc=andreyorst@gmail.com \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).