summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2019-08-04 09:21:18 +0200
committerMartin Rudalics <rudalics@gmx.at>2019-08-04 09:21:18 +0200
commit5ec3f70527e330abf4c0c3519fa4914c5f094358 (patch)
tree3e91fb7a326694d8b46cf9f1ed4e548ce4f7f19d /src/term.c
parent01661f33c11654d1fe5fe1013332db2500b7f449 (diff)
downloademacs-5ec3f70527e330abf4c0c3519fa4914c5f094358.tar.gz
Fix two mouse drag and drop issues (Bug#28620, Bug#36269)
Allow 'mouse-drag-and-drop-region' to move/copy text from one frame to another (Bug#28620). Prevent mouse avoidance mode from interfering with 'mouse-drag-and-drop-region' (Bug#36269). * lisp/avoid.el (mouse-avoidance-ignore-p): Suspend avoidance when 'track-mouse' equals 'dropping'. * lisp/mouse.el (mouse-drag-and-drop-region): Set 'track-mouse' to 'dropping'. Continue reading events also when switching frames. * src/keyboard.c (Finternal_track_mouse): Rename from Ftrack_mouse. (some_mouse_moved): Return NULL also when mouse is not tracked. (show_help_echo, readable_events, kbd_buffer_get_event): Don't check whether mouse is tracked, some_mouse_moved does it now. (track_mouse): Rename variable from do_mouse_tracking. Adjust all users. In doc-string explain meanings of special values 'dragging' and 'dropping'. * src/nsterm.m (ns_mouse_position): During drag and drop consider last mouse frame only when there is no currently focused frame. * src/w32fns.c (w32_wnd_proc): Don't set mouse capture during a drag and drop operation. * src/w32term.c (w32_mouse_position): Track frame under mouse during mouse drag and drop. (mouse_or_wdesc_frame): New function. (w32_read_socket): Call mouse_or_wdesc_frame on mouse events. * src/xdisp.c (define_frame_cursor1): Don't change mouse cursor shape during mouse drag and drop. (syms_of_xdisp): New symbol Qdropping. * src/xterm.c (XTmouse_position): Allow mouse drag and drop move to another frame (mouse_or_wdesc_frame): New function. (handle_one_xevent): Use mouse_or_wdesc_frame for mouse events.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c
index b058d8bdad0..a88d47f9238 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3033,18 +3033,18 @@ read_menu_input (struct frame *sf, int *x, int *y, int min_y, int max_y,
bool usable_input = 1;
mi_result st = MI_CONTINUE;
struct tty_display_info *tty = FRAME_TTY (sf);
- Lisp_Object saved_mouse_tracking = do_mouse_tracking;
+ Lisp_Object old_track_mouse = track_mouse;
/* Signal the keyboard reading routines we are displaying a menu
on this terminal. */
tty->showing_menu = 1;
/* We want mouse movements be reported by read_menu_command. */
- do_mouse_tracking = Qt;
+ track_mouse = Qt;
do {
cmd = read_menu_command ();
} while (NILP (cmd));
tty->showing_menu = 0;
- do_mouse_tracking = saved_mouse_tracking;
+ track_mouse = old_track_mouse;
if (EQ (cmd, Qt) || EQ (cmd, Qtty_menu_exit)
/* If some input switched frames under our feet, exit the