From: Gregory Heytings <gregory@heytings.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 47969@debbugs.gnu.org, robert@capuchin.co.uk
Subject: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
Date: Tue, 25 May 2021 08:52:04 +0000 [thread overview]
Message-ID: <e19e2fa86059eb07b3d0@heytings.org> (raw)
In-Reply-To: <jwvo8dl5p0b.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
>
> We could do that, yes. The downside is that this requires special
> handling in src/keyboard.c, which is ... delicate ;-)
>
I don't think it is really useful to add such a special handling to fix
this bug (but it could make sense to add it later). I attach the updated
patch, which I think does the right thing.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=Do-not-switch-to-other-window-when-minibuffer-is-sel.patch, Size: 1207 bytes --]
From 84a44926c3e5754f73116ee4ae95b01bf1f3dac3 Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Tue, 25 May 2021 08:46:46 +0000
Subject: [PATCH] Do not switch to other window when minibuffer is selected
* lisp/window.el (handle-select-window): Do not silently switch to other
window when minibuffer is selected and mouse-autoselect-window is t
(Bug#47969).
---
lisp/window.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/window.el b/lisp/window.el
index 0f94d8a214..fd1c617d6b 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10055,6 +10055,9 @@ handle-select-window
;; already selected.
(and (not (eq frame (selected-frame)))
(frame-parameter frame 'no-accept-focus))
+ ;; Don't switch if window autoselection with mouse is active
+ ;; and minibuffer window is selected.
+ (and mouse-autoselect-window (window-minibuffer-p))
;; Don't switch to minibuffer window unless it's active.
(and (window-minibuffer-p window)
(not (minibuffer-window-active-p window))))
--
2.30.2
next prev parent reply other threads:[~2021-05-25 8:52 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 13:00 bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command Robert Marshall
2021-04-24 17:29 ` Gregory Heytings
2021-04-25 6:41 ` Robert Marshall
2021-04-25 9:58 ` Gregory Heytings
2021-04-25 12:28 ` Robert Marshall
2021-04-25 12:29 ` Gregory Heytings
2021-05-01 20:20 ` Gregory Heytings
2021-05-02 6:40 ` Eli Zaretskii
2021-05-03 9:07 ` Lars Ingebrigtsen
2021-05-03 11:54 ` Eli Zaretskii
2021-05-03 12:15 ` Gregory Heytings
2021-05-03 12:18 ` Eli Zaretskii
2021-05-02 7:39 ` martin rudalics
2021-05-02 8:01 ` Robert Marshall
2021-05-03 8:42 ` Gregory Heytings
2021-05-03 9:38 ` martin rudalics
2021-05-03 9:41 ` Gregory Heytings
2021-05-03 11:19 ` Gregory Heytings
2021-05-03 12:02 ` martin rudalics
2021-05-03 12:09 ` Eli Zaretskii
2021-05-03 12:20 ` Gregory Heytings
2021-05-03 17:31 ` martin rudalics
2021-05-03 17:46 ` Eli Zaretskii
2021-05-04 7:41 ` Gregory Heytings
2021-05-04 11:59 ` Eli Zaretskii
2021-05-04 13:04 ` Gregory Heytings
2021-05-04 13:17 ` Eli Zaretskii
2021-05-04 13:26 ` Gregory Heytings
2021-05-04 14:02 ` Eli Zaretskii
2021-05-04 14:43 ` Gregory Heytings
2021-05-04 15:19 ` Eli Zaretskii
2021-05-05 7:25 ` martin rudalics
2021-05-05 9:02 ` Gregory Heytings
2021-05-05 9:25 ` martin rudalics
2021-05-05 9:40 ` Gregory Heytings
2021-05-05 11:24 ` martin rudalics
2021-05-05 12:06 ` Eli Zaretskii
2021-05-06 7:44 ` martin rudalics
2021-05-06 8:06 ` Eli Zaretskii
2021-05-06 13:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06 13:50 ` Gregory Heytings
2021-05-06 14:18 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-08 12:38 ` Eli Zaretskii
2021-05-08 13:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-25 8:52 ` Gregory Heytings [this message]
2021-05-25 19:40 ` Lars Ingebrigtsen
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=e19e2fa86059eb07b3d0@heytings.org \
--to=gregory@heytings.org \
--cc=47969@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=robert@capuchin.co.uk \
/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).