diff options
| author | Gerd Möllmann | 2025-01-23 15:38:26 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2025-01-23 15:38:26 +0100 |
| commit | 7c10518d169210b0aaf53035dff44923d7ee663c (patch) | |
| tree | 3f43b02edfe85fd659380bd3d22b756f44d70457 /src | |
| parent | 24ee7217957c621c951d7d3956889aff74f74a7e (diff) | |
| parent | d83d090de1127d6e88e4ff33a617d8621a85a8cd (diff) | |
| download | emacs-scratch/se-matrix.tar.gz emacs-scratch/se-matrix.zip | |
Merge branch 'master' into scratch/se-matrixscratch/se-matrix
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/dispnew.c | 4 | ||||
| -rw-r--r-- | src/term.c | 17 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index af4e0547af4..3582b9d567d 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3967,6 +3967,8 @@ void check_window_matrix_pointers_for_frame (struct frame *f); | |||
| 3967 | # else | 3967 | # else |
| 3968 | INLINE void check_window_matrix_pointers_for_frame (struct frame *f) {} | 3968 | INLINE void check_window_matrix_pointers_for_frame (struct frame *f) {} |
| 3969 | # endif | 3969 | # endif |
| 3970 | void frame_pos_abs (struct frame *f, int *x, int *y); | ||
| 3971 | bool is_frame_ancestor (struct frame *f1, struct frame *f2); | ||
| 3970 | 3972 | ||
| 3971 | INLINE_HEADER_END | 3973 | INLINE_HEADER_END |
| 3972 | 3974 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index a35ded7e567..93cf40b0203 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3383,7 +3383,7 @@ rect_intersect (struct rect *r, struct rect r1, struct rect r2) | |||
| 3383 | 3383 | ||
| 3384 | /* Return the absolute position of frame F in *X and *Y. */ | 3384 | /* Return the absolute position of frame F in *X and *Y. */ |
| 3385 | 3385 | ||
| 3386 | static void | 3386 | void |
| 3387 | frame_pos_abs (struct frame *f, int *x, int *y) | 3387 | frame_pos_abs (struct frame *f, int *x, int *y) |
| 3388 | { | 3388 | { |
| 3389 | *x = *y = 0; | 3389 | *x = *y = 0; |
| @@ -3423,7 +3423,7 @@ max_child_z_order (struct frame *parent) | |||
| 3423 | 3423 | ||
| 3424 | /* Return true if F1 is an ancestor of F2. */ | 3424 | /* Return true if F1 is an ancestor of F2. */ |
| 3425 | 3425 | ||
| 3426 | static bool | 3426 | bool |
| 3427 | is_frame_ancestor (struct frame *f1, struct frame *f2) | 3427 | is_frame_ancestor (struct frame *f1, struct frame *f2) |
| 3428 | { | 3428 | { |
| 3429 | for (struct frame *f = FRAME_PARENT_FRAME (f2); f; f = FRAME_PARENT_FRAME (f)) | 3429 | for (struct frame *f = FRAME_PARENT_FRAME (f2); f; f = FRAME_PARENT_FRAME (f)) |
diff --git a/src/term.c b/src/term.c index 47fd9297ab5..4774b7a32d0 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2990,19 +2990,16 @@ tty_menu_calc_size (tty_menu *menu, int *width, int *height) | |||
| 2990 | static void | 2990 | static void |
| 2991 | mouse_get_xy (int *x, int *y) | 2991 | mouse_get_xy (int *x, int *y) |
| 2992 | { | 2992 | { |
| 2993 | Lisp_Object lmx = Qnil, lmy = Qnil; | ||
| 2994 | Lisp_Object mouse = mouse_position (tty_menu_calls_mouse_position_function); | 2993 | Lisp_Object mouse = mouse_position (tty_menu_calls_mouse_position_function); |
| 2995 | 2994 | ||
| 2996 | if (EQ (selected_frame, XCAR (mouse))) | 2995 | struct frame *f = XFRAME (XCAR (mouse)); |
| 2997 | { | 2996 | struct frame *sf = SELECTED_FRAME (); |
| 2998 | lmx = XCAR (XCDR (mouse)); | 2997 | if (f == sf || is_frame_ancestor (sf, f)) |
| 2999 | lmy = XCDR (XCDR (mouse)); | ||
| 3000 | } | ||
| 3001 | |||
| 3002 | if (!NILP (lmx)) | ||
| 3003 | { | 2998 | { |
| 3004 | *x = XFIXNUM (lmx); | 2999 | int fx, fy; |
| 3005 | *y = XFIXNUM (lmy); | 3000 | frame_pos_abs (f, &fx, &fy); |
| 3001 | *x = fx + XFIXNUM (XCAR (XCDR (mouse))); | ||
| 3002 | *y = fy + XFIXNUM (XCDR (XCDR (mouse))); | ||
| 3006 | } | 3003 | } |
| 3007 | } | 3004 | } |
| 3008 | 3005 | ||