From c29fb3e0d8255a0f0e40f70f6a0e290dccfdd302 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 9 Jun 2022 19:42:56 +0800 Subject: [PATCH] Never return tooltip frames from ns-begin-drag * src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): ([EmacsWindow beginDrag:forPasteboard...]): Don't return frame if tooltip. --- src/nsterm.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 3b2830e73d6..891d52ea3f0 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -9651,7 +9651,8 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c) dnd_mode = RETURN_FRAME_NOW; if (dnd_mode != RETURN_FRAME_NOW - || ![[w delegate] isKindOfClass: [EmacsView class]]) + || ![[w delegate] isKindOfClass: [EmacsView class]] + || ((EmacsView *) [w delegate])->emacsframe->tooltip) goto out; dnd_return_frame = ((EmacsView *) [w delegate])->emacsframe; @@ -9709,7 +9710,8 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c) belowWindowWithWindowNumber: 0]; w = [NSApp windowWithWindowNumber: window_number]; - if (w && [[w delegate] isKindOfClass: [EmacsView class]]) + if (w && [[w delegate] isKindOfClass: [EmacsView class]] + && !((EmacsView *) [w delegate])->emacsframe->tooltip) { *frame_return = ((EmacsView *) [w delegate])->emacsframe; [image release]; -- 2.39.2