summaryrefslogtreecommitdiff
path: root/lisp/select.el
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-02 14:59:08 +0800
committerPo Lu <luangruo@yahoo.com>2022-04-02 14:59:08 +0800
commit0a32037c92be331d4f44401109e90ff826494b6d (patch)
tree5f9ab5c52d6d4cc0d6125a8d3e3df3c806cf95ad /lisp/select.el
parent35ad6bc2acf1c5a76c9f46cd0c7b64e72a88e2ea (diff)
downloademacs-0a32037c92be331d4f44401109e90ff826494b6d.tar.gz
Implement DELETE selection target for cross program drags
* lisp/mouse.el (mouse-drag-and-drop-region): Make sure mark stays deactivated if a "cut" operation was performed. * lisp/select.el (xselect-convert-to-delete): Don't clear selection contents if it's the XdndSelection.
Diffstat (limited to 'lisp/select.el')
-rw-r--r--lisp/select.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/select.el b/lisp/select.el
index 0b51f01cc58..3646a28b9b4 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -607,7 +607,9 @@ two markers or an overlay. Otherwise, it is nil."
selection-converter-alist))))))
(defun xselect-convert-to-delete (selection _type _value)
- (gui-backend-set-selection selection nil)
+ ;; This should be handled by the caller of `x-begin-drag'.
+ (unless (eq selection 'XdndSelection)
+ (gui-backend-set-selection selection nil))
;; A return value of nil means that we do not know how to do this conversion,
;; and replies with an "error". A return value of NULL means that we have
;; done the conversion (and any side-effects) but have no value to return.