mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Support TTY child frames with GPM mouse
* lisp/frame.el (x-list-fonts): Delete `frame-at', to move to C implementation. * lisp/xt-mouse.el (xterm-mouse-event): Call new `tty-frame-at'. * src/term.c (tty_frame_at, Ftty_frame_at): New C function, replacing `frame-at' only for TTYs. (term_mouse_position): Use last_mouse_frame when it is set. (handle_one_term_event): Call tty_frame_at to get frame under mouse, store it in last_mouse_frame. Alter event coordinates based on mouse frame. (syms_of_term): Add tty-frame-at, last_mouse_frame. * src/termhooks.h: Make Gpm_Event parameter const.
This commit is contained in:
parent
2f63dab3ee
commit
d018a26f9c
4 changed files with 60 additions and 21 deletions
|
|
@ -1506,13 +1506,6 @@ FRAME defaults to the selected frame."
|
|||
(let ((edges (frame-edges frame 'outer-edges)))
|
||||
(- (nth 3 edges) (nth 1 edges))))
|
||||
|
||||
(defun frame-at (x y)
|
||||
"Return frame containing pixel position X, Y."
|
||||
(cl-loop for frame in (frame-list-z-order)
|
||||
as (x0 y0 x1 y1) = (frame-edges frame)
|
||||
when (and (<= x0 x (1- x1)) (<= y0 y (1- y1)))
|
||||
return frame))
|
||||
|
||||
(declare-function x-list-fonts "xfaces.c"
|
||||
(pattern &optional face frame maximum width))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue