From: jared Date: Sun, 26 Jan 2025 22:43:51 +0000 (-0800) Subject: Fix clicking in child frames with GPM X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b94612ec9bbd2fc274e22e9ae05656f455ee4c7;p=emacs.git Fix clicking in child frames with GPM * src/term.c (handle_one_term_event): Store child frame coordinates in event. (cherry picked from commit 5eae7f5227c7789dea45cef26fec17c057024670) --- diff --git a/src/term.c b/src/term.c index e519813c7ac..a058cb1f62a 100644 --- a/src/term.c +++ b/src/term.c @@ -2767,9 +2767,11 @@ term_mouse_click (struct input_event *result, Gpm_Event *event, int handle_one_term_event (struct tty_display_info *tty, const Gpm_Event *event_in) { + int child_x, child_y; + Lisp_Object frame = tty_frame_at (event_in->x, event_in->y, &child_x, &child_y); Gpm_Event event = *event_in; - int gpm_x = event.x, gpm_y = event.y; - Lisp_Object frame = tty_frame_at (event_in->x, event_in->y, &gpm_x, &gpm_y); + event.x = child_x; + event.y = child_y; struct frame *f = decode_live_frame (frame); struct input_event ie;