1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Make dropping files on Motif programs work

* lisp/dired.el (dired-mouse-drag): Announce "FILE" and
"FILE_NAME" as targets as well.
* lisp/select.el (xselect-convert-to-filename): Handle
XdndSelection specially.
(xselect-convert-to-xm-file): New function.
(selection-converter-alist): Add new converters.
This commit is contained in:
Po Lu 2022-04-01 09:50:58 +08:00
parent 79b50d0f90
commit 540e7298a9
2 changed files with 17 additions and 5 deletions

View file

@ -1749,8 +1749,8 @@ when Emacs exits or the user drags another file.")
(add-hook 'kill-emacs-hook
#'dired-remove-last-dragged-local-file))
(gui-backend-set-selection 'XdndSelection filename)
(x-begin-drag '("text/uri-list"
"text/x-dnd-username")
(x-begin-drag '("text/uri-list" "text/x-dnd-username"
"FILE_NAME" "FILE")
(if (eq 'dired-mouse-drag-files 'link)
'XdndActionLink
'XdndActionCopy)