GNU bug report logs - #56305
29.0.50; 'yes-or-no-p' deselects minibuffer frame

Previous Next

Package: emacs;

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

Date: Wed, 29 Jun 2022 17:55:01 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: rudalics <at> gmx.at, Eli Zaretskii <eliz <at> gnu.org>, Andreas Schwab <schwab <at> linux-m68k.org>, 56305 <at> debbugs.gnu.org, acm <at> muc.de
Subject: bug#56305: 29.0.50; 'yes-or-no-p' deselects minibuffer frame
Date: Fri, 8 Jul 2022 21:03:16 +0000
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).




This bug report was last modified 2 years and 331 days ago.

Previous Next


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