Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: ui/views/cocoa/drag_drop_client_mac.mm

Issue 2337233004: MacViews: Fix sending mouse exit event and releasing capture on D&D. (Closed)
Patch Set: Fix review issues. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/cocoa/drag_drop_client_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/drag_drop_client_mac.mm
diff --git a/ui/views/cocoa/drag_drop_client_mac.mm b/ui/views/cocoa/drag_drop_client_mac.mm
index f2b77998edb4a177aca2703b3d8690e4a464a4b8..9dda333f01be43f1580fc022315501b8f7f162ef 100644
--- a/ui/views/cocoa/drag_drop_client_mac.mm
+++ b/ui/views/cocoa/drag_drop_client_mac.mm
@@ -79,6 +79,11 @@ void DragDropClientMac::StartDragAndDrop(
const ui::OSExchangeDataProviderMac& provider =
static_cast<const ui::OSExchangeDataProviderMac&>(data.provider());
+ // Release capture before beginning the dragging session. Capture may have
+ // been acquired on the mouseDown, but capture is not required during the
+ // dragging session and the mouseUp that would release it will be suppressed.
+ bridge_->ReleaseCapture();
+
// Synthesize an event for dragging, since we can't be sure that
// [NSApp currentEvent] will return a valid dragging event.
NSWindow* window = bridge_->ns_window();
« no previous file with comments | « no previous file | ui/views/cocoa/drag_drop_client_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698