]> git.eshelyaron.com Git - emacs.git/commitdiff
Never return tooltip frames from ns-begin-drag
authorPo Lu <luangruo@yahoo.com>
Thu, 9 Jun 2022 11:42:56 +0000 (19:42 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 9 Jun 2022 11:42:56 +0000 (19:42 +0800)
* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]):
([EmacsWindow beginDrag:forPasteboard...]): Don't return frame
if tooltip.

src/nsterm.m

index 3b2830e73d651c3ffd7f07b7f53393ec88da3cc2..891d52ea3f099944e0950d8b0dd85e8c268d9585 100644 (file)
@@ -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];