From: Po Lu Date: Sat, 4 Jun 2022 07:41:39 +0000 (+0800) Subject: Fix splurious drag-mouse-1 events after NS drag-and-drop X-Git-Tag: emacs-29.0.90~1910^2~246 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1289d0c3dd964a501ea0b039c0ce9bc39ec47caa;p=emacs.git Fix splurious drag-mouse-1 events after NS drag-and-drop * src/nsterm.m ([EmacsWindow beginDrag:...]): Clear dpyinfo->grabbed. --- diff --git a/src/nsterm.m b/src/nsterm.m index ecaca5b87fa..04475bbba05 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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;