From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#56305: 29.0.50; 'yes-or-no-p' deselects minibuffer frame Date: Fri, 8 Jul 2022 21:03:16 +0000 Message-ID: References: <83zghn7ckd.fsf@gnu.org> <83zghm5evt.fsf@gnu.org> <878rp6qd9t.fsf@igel.home> <874jzuqcr7.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17216"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, Eli Zaretskii , Andreas Schwab , 56305@debbugs.gnu.org, acm@muc.de To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 08 23:04:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9v91-0004B0-My for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Jul 2022 23:04:11 +0200 Original-Received: from localhost ([::1]:45808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9v8z-00011N-SG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Jul 2022 17:04:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9v8s-000113-VT for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2022 17:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9v8s-0005u8-KC for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2022 17:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o9v8s-0005FG-EM for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2022 17:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Jul 2022 21:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56305 X-GNU-PR-Package: emacs Original-Received: via spool by 56305-submit@debbugs.gnu.org id=B56305.165731420520120 (code B ref 56305); Fri, 08 Jul 2022 21:04:02 +0000 Original-Received: (at 56305) by debbugs.gnu.org; 8 Jul 2022 21:03:25 +0000 Original-Received: from localhost ([127.0.0.1]:33265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9v8H-0005ER-Ik for submit@debbugs.gnu.org; Fri, 08 Jul 2022 17:03:25 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:63732 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1o9v8G-0005EE-1y for 56305@debbugs.gnu.org; Fri, 08 Jul 2022 17:03:24 -0400 Original-Received: (qmail 47238 invoked by uid 3782); 8 Jul 2022 21:03:18 -0000 Original-Received: from acm.muc.de (p4fe15b6e.dip0.t-ipconnect.de [79.225.91.110]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 08 Jul 2022 23:03:17 +0200 Original-Received: (qmail 20777 invoked by uid 1000); 8 Jul 2022 21:03:16 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236466 Archived-At: Hello, Stefan. On Thu, Jul 07, 2022 at 14:57:02 -0400, Stefan Monnier wrote: > > diff --git a/src/minibuf.c b/src/minibuf.c > > index 0fc7f2caa1..71fd62cede 100644 > > --- a/src/minibuf.c > > +++ b/src/minibuf.c > > @@ -896,6 +896,12 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, > > /* Don't allow the user to undo past this point. */ > > bset_undo_list (current_buffer, Qnil); > > > > + /* If some Emacs frame currently has the window-system focus, give > > + it to the minibuffer frame. This is sometimes needed for > > + minibuffer-only frames. */ > > + if (FRAME_DISPLAY_INFO (XFRAME (mini_frame))->x_focus_frame) > > + Fx_focus_frame (mini_frame, Qt); > > + > > recursive_edit_1 (); > To avoid problems when we play with actual focus, what happens if we > play with the focus-redirection here instead? Ouch! Well, the Fx_focus_frame is there to cause the window manager's notion of focus to be set to our frame. I wouldn't think it would make much difference whether that's Emacs's "focus-frame" or its "redirected focus-frame". The same frame would get the WM-focus. Whether it would make any difference to the subsequent Emacs frame management, I couldn't say at the moment. (My head is spinning from the last few days' thinking about this.) > Stefan -- Alan Mackenzie (Nuremberg, Germany).