Function: ghostel--event-window
ghostel--event-window is a natively compiled function defined in
ghostel.el.
Signature
(ghostel--event-window EVENT)
Documentation
Return EVENT's window.
posn-window returns a frame for positions outside any window;
use that frame's selected window.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
;;; Scroll intercept via emulation-mode-map-alists
;;
;; We need highest-priority interception of wheel events so that terminal
;; mouse tracking (vim, htop, etc.) receives scroll events. When mouse
;; tracking is off, we fall through to whatever scroll package the user
;; has configured (ultra-scroll, pixel-scroll-precision-mode, etc.).
(defun ghostel--event-window (event)
"Return EVENT's window.
`posn-window' returns a frame for positions outside any window;
use that frame's selected window."
(let ((win (posn-window (event-start event))))
(if (framep win) (frame-selected-window win) win)))