From: Po Lu Date: Thu, 9 Jun 2022 11:42:56 +0000 (+0800) Subject: Never return tooltip frames from ns-begin-drag X-Git-Tag: emacs-29.0.90~1910^2~129 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c29fb3e0d8255a0f0e40f70f6a0e290dccfdd302;p=emacs.git Never return tooltip frames from ns-begin-drag * src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): ([EmacsWindow beginDrag:forPasteboard...]): Don't return frame if tooltip. --- 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];