Variable: mouse-position-function
mouse-position-function is a variable defined in frame.c.
Value
#[257 "\211:\203\n\211\300 \240\210\207"
[selected-frame]
3 "Make `mouse-position' and `mouse-pixel-position' return the selected frame.\nUnder macOS and Windows 7 at least, upon initial selection of a new\nframe, those functions by default still return the prior frame.\n\n(fn FRAME-X-DOT-Y)"]
Documentation
If non-nil, function to transform normal value of mouse-position.
mouse-position and mouse-pixel-position call this function, passing their
usual return value as argument, and return whatever this function returns.
This abnormal hook exists for the benefit of packages like xt-mouse.el
which need to do mouse handling at the Lisp level.
Probably introduced at or before Emacs version 21.1.
Source Code
// Defined in /usr/src/emacs/src/frame.c
DEFVAR_LISP ("mouse-position-function", Vmouse_position_function,
doc: /* If non-nil, function to transform normal value of `mouse-position'.
`mouse-position' and `mouse-pixel-position' call this function, passing their
usual return value as argument, and return whatever this function returns.
This abnormal hook exists for the benefit of packages like `xt-mouse.el'
which need to do mouse handling at the Lisp level. */);