From cfc85ca0f16b194367ecfb195a237b955f81088b Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Sat, 1 May 2021 20:17:30 +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, which can happen with mouse-autoselect-window t (Bug#47969). --- lisp/window.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/window.el b/lisp/window.el index cf5752113d..77609a794b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -10048,6 +10048,8 @@ handle-select-window ;; already selected. (and (not (eq frame (selected-frame))) (frame-parameter frame 'no-accept-focus)) + ;; Don't switch if minibuffer window is selected. + (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