aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsmenu.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/nsmenu.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/nsmenu.m')
-rw-r--r--src/nsmenu.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 028d19f597a..d02d7bae4b5 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1497,6 +1497,15 @@ update_frame_tool_bar (struct frame *f)
1497 [timer retain]; 1497 [timer retain];
1498} 1498}
1499 1499
1500- (void) moveTo: (NSPoint) screen_point
1501{
1502 [win setFrame: NSMakeRect (screen_point.x,
1503 screen_point.y,
1504 [self frame].size.width,
1505 [self frame].size.height)
1506 display: YES];
1507}
1508
1500- (void) hide 1509- (void) hide
1501{ 1510{
1502 [win close]; 1511 [win close];