aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorPo Lu2022-06-09 16:34:18 +0800
committerPo Lu2022-06-09 16:34:18 +0800
commite7ac2ac4e07d3fd6fee4a74a9cfc5bac9310fc18 (patch)
tree2cf1ab3a6a41efbeaba620441cb3ace30bd48a3e /lisp/term
parent0ba43e15d9c9ffb3df8aeb3a7e446d9a4d62ccff (diff)
downloademacs-e7ac2ac4e07d3fd6fee4a74a9cfc5bac9310fc18.tar.gz
emacs-e7ac2ac4e07d3fd6fee4a74a9cfc5bac9310fc18.zip
Implement `follow-tooltip' on NS as well
* lisp/term/ns-win.el (x-begin-drag): Pass `follow-tooltip'. * src/nsfns.m (Fx_show_tip): Record last dx and dy. (syms_of_nsfns): New staticpros. * src/nsmenu.m ([EmacsTooltip moveTo:]): New method. * src/nsselect.m (Fns_begin_drag): New parameter `follow-tooltip'. * src/nsterm.h (@interface EmacsWindow): (EmacsTooltip): Update prototypes. * src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): Move any tooltip to the right location. ([EmacsWindow beginDrag:forPasteboard...]): New parameter `followTooltip'.
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/ns-win.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 0d46a895ce8..ac1007f94fe 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -896,7 +896,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
896 (ns-get-selection selection-symbol target-type)) 896 (ns-get-selection selection-symbol target-type))
897 897
898(defun x-begin-drag (targets &optional action frame return-frame 898(defun x-begin-drag (targets &optional action frame return-frame
899 allow-current-frame _follow-tooltip) 899 allow-current-frame follow-tooltip)
900 "SKIP: real doc in xfns.c." 900 "SKIP: real doc in xfns.c."
901 (unless ns-dnd-selection-value 901 (unless ns-dnd-selection-value
902 (error "No local value for XdndSelection")) 902 (error "No local value for XdndSelection"))
@@ -921,7 +921,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
921 (expand-file-name 921 (expand-file-name
922 ns-dnd-selection-value)))) 922 ns-dnd-selection-value))))
923 pasteboard)))) 923 pasteboard))))
924 (ns-begin-drag frame pasteboard action return-frame allow-current-frame))) 924 (ns-begin-drag frame pasteboard action return-frame
925 allow-current-frame follow-tooltip)))
925 926
926(defun ns-handle-drag-motion (frame x y) 927(defun ns-handle-drag-motion (frame x y)
927 "Handle mouse movement on FRAME at X and Y during drag-and-drop. 928 "Handle mouse movement on FRAME at X and Y during drag-and-drop.