Function: mode-line-window-select
mode-line-window-select is a byte-compiled function defined in
bindings.el.gz.
Signature
(mode-line-window-select &optional IGNORED-ARG)
Documentation
Select the window on whose mode-line the mouse was clicked.
Probably introduced at or before Emacs version 32.1.
Source Code
;; Defined in /usr/src/emacs/lisp/bindings.el.gz
(defun mode-line-window-select (&optional _ignored-arg)
"Select the window on whose mode-line the mouse was clicked."
(when-let* ((_ (mouse-event-p last-input-event))
(event (event-start last-input-event))
(_ (eq (posn-area event) 'mode-line))
(window (posn-window event))
(_ (not (eq (selected-window) window))))
(mouse-select-window last-input-event)))