From 84a44926c3e5754f73116ee4ae95b01bf1f3dac3 Mon Sep 17 00:00:00 2001 From: Gregory Heytings 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