]> git.eshelyaron.com Git - emacs.git/commit
Fix two mouse drag and drop issues (Bug#28620, Bug#36269)
authorMartin Rudalics <rudalics@gmx.at>
Sun, 4 Aug 2019 07:21:18 +0000 (09:21 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Sun, 4 Aug 2019 07:21:18 +0000 (09:21 +0200)
commit5ec3f70527e330abf4c0c3519fa4914c5f094358
tree3e91fb7a326694d8b46cf9f1ed4e548ce4f7f19d
parent01661f33c11654d1fe5fe1013332db2500b7f449
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.
lisp/avoid.el
lisp/mouse.el
src/dispnew.c
src/keyboard.c
src/nsterm.m
src/term.c
src/w32fns.c
src/w32term.c
src/xdisp.c
src/xterm.c