summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-05 00:54:03 +0000
committerPo Lu <luangruo@yahoo.com>2022-04-05 00:54:03 +0000
commit1e1a66831bf1d8ca33b3ad37d23211fa98d92e63 (patch)
treebf2e05c9bac5b72f1bab68ab15738649b3e75467 /lisp/mouse.el
parent74100997b3853a6c00c60e1998ed5a86a9a01bc3 (diff)
downloademacs-1e1a66831bf1d8ca33b3ad37d23211fa98d92e63.tar.gz
Respect new DND options when dragging to ourselves on Haiku
* lisp/mouse.el (mouse-drag-and-drop-region): Allow dragging to the current frame if we know `return-frame' doesn't work. * lisp/term/haiku-win.el (haiku-dnd-drag-handler): New function. * src/haiku_support.cc (MouseMoved): Don't send drag motion events for the drag frame. * src/haikuselect.c (haiku_note_drag_motion_1) (haiku_note_drag_motion_2, haiku_note_drag_motion): New functions. (syms_of_haikuselect): New variable `haiku-drag-track-function'. * src/haikuterm.c (haiku_read_socket): Note mouse motion in that case.q * src/haikuterm.h: Update prototypes.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 26a17365da2..b66cfad4878 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -3190,7 +3190,12 @@ is copied instead of being cut."
(if mouse-drag-and-drop-region-cut-when-buffers-differ
'XdndActionMove
'XdndActionCopy)
- (posn-window (event-end event)) 'now)
+ (posn-window (event-end event)) 'now
+ ;; On platforms where we know
+ ;; `return-frame' doesn't
+ ;; work, allow dropping on
+ ;; the drop frame.
+ (eq window-system 'haiku))
(quit nil))))
(when (framep drag-action-or-frame)
;; With some window managers `x-begin-drag'