]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix splurious drag-mouse-1 events after NS drag-and-drop
authorPo Lu <luangruo@yahoo.com>
Sat, 4 Jun 2022 07:41:39 +0000 (15:41 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 4 Jun 2022 07:41:39 +0000 (15:41 +0800)
* src/nsterm.m ([EmacsWindow beginDrag:...]): Clear
dpyinfo->grabbed.

src/nsterm.m

index ecaca5b87fa1f719bf9a5cd8385116310365d502..04475bbba0598766ea39106c38034ac00fe42815 100644 (file)
@@ -9662,7 +9662,6 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
   NSInteger window_number;
   NSWindow *w;
 #endif
-
   drag_op = op;
   selected_op = NSDragOperationNone;
   image = [[NSImage alloc] initWithSize: NSMakeSize (1.0, 1.0)];
@@ -9716,6 +9715,11 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
 #endif
   unblock_input ();
 
+  /* Assume all buttons have been released since the drag-and-drop
+     operation is now over.  */
+  if (!dnd_return_frame)
+    x_display_list->grabbed = 0;
+
   [image release];
 
   *frame_return = dnd_return_frame;