[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f6f5634378: Update Haiku drag-and-drop code
From: |
Po Lu |
Subject: |
master f6f5634378: Update Haiku drag-and-drop code |
Date: |
Mon, 6 Jun 2022 22:45:11 -0400 (EDT) |
branch: master
commit f6f5634378228bf170576d5fad691a9708e3023c
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Update Haiku drag-and-drop code
* lisp/term/haiku-win.el (haiku-drag-and-drop): Don't allow
dropping on places other than the text area (it doesn't work).
Also respect mouse-yank-at-point.
---
lisp/term/haiku-win.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el
index 0dcfc1e920..6ddf546ee5 100644
--- a/lisp/term/haiku-win.el
+++ b/lisp/term/haiku-win.el
@@ -311,6 +311,9 @@ or a pair of markers) and turns it into a file system
reference."
(if (eq string 'lambda) ; This means the mouse moved.
(dnd-handle-movement (event-start event))
(cond
+ ;; Don't allow dropping on something other than the text area.
+ ;; It does nothing and doesn't work with text anyway.
+ ((posn-area (event-start event)))
((assoc "refs" string)
(with-selected-window window
(raise-frame)
@@ -326,7 +329,8 @@ or a pair of markers) and turns it into a file system
reference."
(with-selected-window window
(raise-frame)
(dolist (text (cddr (assoc "text/plain" string)))
- (goto-char (posn-point (event-start event)))
+ (unless mouse-yank-at-point
+ (goto-char (posn-point (event-start event))))
(dnd-insert-text window 'private
(if (multibyte-string-p text)
text
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f6f5634378: Update Haiku drag-and-drop code,
Po Lu <=