]> git.eshelyaron.com Git - emacs.git/commitdiff
Do not switch to other window when minibuffer is selected
authorGregory Heytings <gregory@heytings.org>
Tue, 25 May 2021 19:40:02 +0000 (21:40 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 25 May 2021 19:41:07 +0000 (21:41 +0200)
* 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

index 0f94d8a2141894ad12799c8385e0799166d4fc6d..fd1c617d6be6fe32301ff6e4913e5666f759ee59 100644 (file)
@@ -10055,6 +10055,9 @@ is active.  This function is run by `mouse-autoselect-window-timer'."
                 ;; 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))))