]> git.eshelyaron.com Git - emacs.git/commit
Fix reported problem with drag-and-drop inside VirtualBox
authorPo Lu <luangruo@yahoo.com>
Wed, 29 Jun 2022 02:24:14 +0000 (10:24 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 29 Jun 2022 02:24:14 +0000 (10:24 +0800)
commit0e6516a1f022e18f4e32848331954deb0e850d4e
treeaaf82c350a8aee4ea7867587af7a6555ca6804af
parent9705609c0ef5e426606300da95fed4bec54923fb
Fix reported problem with drag-and-drop inside VirtualBox

* lisp/x-dnd.el (x-dnd-handle-old-kde, x-dnd-handle-offix)
(x-dnd-handle-motif): Select window before handling drop, like
on Xdnd.
(x-dnd-convert-to-offix, x-dnd-do-offix-drop)
(x-dnd-handle-unsupported-drop): Accept local selection data and
use that instead.

* src/keyboard.c (kbd_buffer_get_event): Call unsupported drop
function with local selection data as 8th arg.
* src/xselect.c (x_get_local_selection): Accept new arg
`local_value'.  All callers changed.
(Fx_get_local_selection): New function.
(syms_of_xselect): Update defsubrs.

* src/xterm.c (x_dnd_lose_ownership): New function.
(x_dnd_begin_drag_and_drop): Unless new variable is true, disown
XdndSelection after returning.  This supposedly makes
drag-and-drop from guest to host work in VirtualBox without
causing pointer motion to become choppy afterwards.
(syms_of_xterm): New variable `x_dnd_preserve_selection_data'
and update doc string of `x-dnd-unsupported-drop-function'.

* test/lisp/dnd-tests.el (dnd-tests-begin-text-drag)
(dnd-tests-begin-file-drag, dnd-tests-begin-drag-files): Set new
variable to nil during tests.
lisp/x-dnd.el
src/keyboard.c
src/xselect.c
src/xterm.c
test/lisp/dnd-tests.el