aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsselect.m
diff options
context:
space:
mode:
authorPo Lu2022-06-09 16:34:18 +0800
committerPo Lu2022-06-09 16:34:18 +0800
commite7ac2ac4e07d3fd6fee4a74a9cfc5bac9310fc18 (patch)
tree2cf1ab3a6a41efbeaba620441cb3ace30bd48a3e /src/nsselect.m
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 'src/nsselect.m')
-rw-r--r--src/nsselect.m12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nsselect.m b/src/nsselect.m
index 6831090aa20..c46bfeaf42a 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -703,7 +703,7 @@ ns_dnd_action_from_operation (NSDragOperation operation)
703 } 703 }
704} 704}
705 705
706DEFUN ("ns-begin-drag", Fns_begin_drag, Sns_begin_drag, 3, 5, 0, 706DEFUN ("ns-begin-drag", Fns_begin_drag, Sns_begin_drag, 3, 6, 0,
707 doc: /* Begin a drag-and-drop operation on FRAME. 707 doc: /* Begin a drag-and-drop operation on FRAME.
708 708
709FRAME must be a window system frame. PBOARD is an alist of (TYPE 709FRAME must be a window system frame. PBOARD is an alist of (TYPE
@@ -729,9 +729,12 @@ other non-nil value means to do the same, but to wait for the mouse to
729leave FRAME first. 729leave FRAME first.
730 730
731If ALLOW-SAME-FRAME is nil, dropping on FRAME will result in the drop 731If ALLOW-SAME-FRAME is nil, dropping on FRAME will result in the drop
732being ignored. */) 732being ignored.
733
734FOLLOW-TOOLTIP means the same thing it does in `x-begin-drag'. */)
733 (Lisp_Object frame, Lisp_Object pboard, Lisp_Object action, 735 (Lisp_Object frame, Lisp_Object pboard, Lisp_Object action,
734 Lisp_Object return_frame, Lisp_Object allow_same_frame) 736 Lisp_Object return_frame, Lisp_Object allow_same_frame,
737 Lisp_Object follow_tooltip)
735{ 738{
736 struct frame *f, *return_to; 739 struct frame *f, *return_to;
737 NSPasteboard *pasteboard; 740 NSPasteboard *pasteboard;
@@ -761,7 +764,8 @@ being ignored. */)
761 forPasteboard: pasteboard 764 forPasteboard: pasteboard
762 withMode: mode 765 withMode: mode
763 returnFrameTo: &return_to 766 returnFrameTo: &return_to
764 prohibitSame: (BOOL) NILP (allow_same_frame)]; 767 prohibitSame: (BOOL) NILP (allow_same_frame)
768 followTooltip: (BOOL) !NILP (follow_tooltip)];
765 769
766 if (return_to) 770 if (return_to)
767 { 771 {