From 45b1cc61505582c91199f1c70debae313d9121b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Sat, 25 Jan 2025 14:28:11 +0100 Subject: [PATCH] Reapply "Fix tty-frame-at for nested tty child frames" This reverts commit 9ad28959d6895720865c0718bf60f4b7b0b144f3. (cherry picked from commit e839b83c828fe09546edcc46dcfc5e09dd39b9fe) --- src/term.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/term.c b/src/term.c index 00bc94e6e31..7397ee68347 100644 --- a/src/term.c +++ b/src/term.c @@ -2603,9 +2603,11 @@ tty_frame_at (int x, int y) { Lisp_Object frame = Fcar (frames); struct frame *f = XFRAME (frame); + int fx, fy; + root_xy (f, 0, 0, &fx, &fy); - if (f->left_pos <= x && x < f->left_pos + f->pixel_width && - f->top_pos <= y && y < f->top_pos + f->pixel_height) + if (fx <= x && x < fx + f->pixel_width + && fy <= y && y < fy + f->pixel_height) return frame; } -- 2.39.5