Function: avy-mouse-event-window

avy-mouse-event-window is a natively compiled function defined in avy.el.

Signature

(avy-mouse-event-window CHAR)

Documentation

Return the window of mouse event CHAR if any or the selected window.

Return nil if CHAR is not a mouse event.

Source Code

;; Defined in /nix/store/015952xhg9b72ira1qyjvb30bn11jiv3-emacs-packages-deps/share/emacs/site-lisp/elpa/avy-20241101.1357/avy.el
(defun avy-mouse-event-window (char)
  "Return the window of mouse event CHAR if any or the selected window.
Return nil if CHAR is not a mouse event."
  (when (mouse-event-p char)
    (cond ((windowp (posn-window (event-start char)))
           (posn-window (event-start char)))
          ((framep (posn-window (event-start char)))
           (frame-selected-window (posn-window (event-start char))))
          (t (selected-window)))))