diff options
author | Jared Finder <jared@finder.org> | 2020-10-03 14:46:30 -0700 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-10-24 13:14:27 +0300 |
commit | 0695c9e8599b5036a80361571e7cb0ea9fdead99 (patch) | |
tree | f6ab30dcdde06d309367f4ae5fbe8688da62dde5 /src/frame.h | |
parent | 9d230684ff16e105db168ebaafdbea2de2e7d6ca (diff) | |
download | emacs-0695c9e8599b5036a80361571e7cb0ea9fdead99.tar.gz emacs-0695c9e8599b5036a80361571e7cb0ea9fdead99.tar.bz2 emacs-0695c9e8599b5036a80361571e7cb0ea9fdead99.zip |
Make TTY menus work with xterm-mouse-mode
* src/term.c (mouse_get_xy): Call 'mouse_position' passing it the
value of 'tty-menu-calls-mouse-position-function' as the
argument.
(syms_of_term) <tty-menu-calls-mouse-position-function>: New
DEFVAR_BOOL.
* src/frame.c (mouse_position): New function, with most of the
code from Fmouse_position, but call 'mouse-position-function' only
if called with non-zero argument.
(Fmouse_position): Call 'mouse_position' to do the job.
* lisp/xt-mouse.el (xterm-mouse-translate-1): Respect
'track-mouse'.
(xterm-mouse-mode): Set 'tty-menu-calls-mouse-position-function'
when setting 'mouse-position-function'.
(xterm-mouse-tracking-enable-sequence): Use SET_ANY_EVENT_MOUSE
(0x1003) so that mouse movement can be reported even if no buttons
are pressed. Doc fix.
* lisp/menu-bar.el (menu-bar-define-mouse-key): New function.
(tty-menu-navigation-map): Call it.
* doc/lispref/frames.texi (Mouse Position): Document
'tty-menu-calls-mouse-position-function'.
* etc/NEWS: Announce 'tty-menu-calls-mouse-position-function'.
Diffstat (limited to 'src/frame.h')
-rw-r--r-- | src/frame.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/frame.h b/src/frame.h index 476bac67faf..16ecfd311c3 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1361,6 +1361,7 @@ extern bool frame_inhibit_resize (struct frame *, bool, Lisp_Object); extern void adjust_frame_size (struct frame *, int, int, int, bool, Lisp_Object); extern void frame_size_history_add (struct frame *f, Lisp_Object fun_symbol, int width, int height, Lisp_Object rest); +extern Lisp_Object mouse_position (bool); extern Lisp_Object Vframe_list; |