]> git.eshelyaron.com Git - emacs.git/commitdiff
Reapply "Fix tty-frame-at for nested tty child frames"
authorGerd Möllmann <gerd@gnu.org>
Sat, 25 Jan 2025 13:28:11 +0000 (14:28 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 25 Jan 2025 17:49:11 +0000 (18:49 +0100)
This reverts commit 9ad28959d6895720865c0718bf60f4b7b0b144f3.

(cherry picked from commit e839b83c828fe09546edcc46dcfc5e09dd39b9fe)

src/term.c

index 00bc94e6e31ebc73bdee0c7c8117dcc0f3e436e0..7397ee68347cfeb374cd5642010a7f404715c600 100644 (file)
@@ -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;
     }