diff options
| author | Gerd Möllmann | 2025-01-25 06:43:49 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2025-01-25 07:35:51 +0100 |
| commit | 9693f2a95ad14bf0caa34e60d72722d4dd4d85c9 (patch) | |
| tree | d9e703f33521e7b1a9b7610eecc7d1ea8a14d1c9 /src | |
| parent | 8cbb3c7335ff03b6fae4efeae126e91993cb962a (diff) | |
| download | emacs-9693f2a95ad14bf0caa34e60d72722d4dd4d85c9.tar.gz emacs-9693f2a95ad14bf0caa34e60d72722d4dd4d85c9.zip | |
Fix tty-frame-at for nested tty child frames
* src/term.c (tty_frame_at): Translate child frame origin to absolute
coordinates.
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 6 |
1 files 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) | |||
| 2603 | { | 2603 | { |
| 2604 | Lisp_Object frame = Fcar (frames); | 2604 | Lisp_Object frame = Fcar (frames); |
| 2605 | struct frame *f = XFRAME (frame); | 2605 | struct frame *f = XFRAME (frame); |
| 2606 | int fx, fy; | ||
| 2607 | root_xy (f, 0, 0, &fx, &fy); | ||
| 2606 | 2608 | ||
| 2607 | if (f->left_pos <= x && x < f->left_pos + f->pixel_width && | 2609 | if (fx <= x && x < fx + f->pixel_width |
| 2608 | f->top_pos <= y && y < f->top_pos + f->pixel_height) | 2610 | && fy <= y && y < fy + f->pixel_height) |
| 2609 | return frame; | 2611 | return frame; |
| 2610 | } | 2612 | } |
| 2611 | 2613 | ||