diff options
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 17 |
1 files changed, 7 insertions, 10 deletions
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 | ||