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

Unified Diff: ui/views/view.cc

Issue 1964283002: MacViews: Implemented Drag & Drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot to add the test Created 4 years, 7 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
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 0e733ad6a898f01863c3eccbda30c5de2bc15237..45ba1f9271c5032eda7820a633b1b06bec460002 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -2412,6 +2412,12 @@ bool View::DoDrag(const ui::LocatedEvent& event,
OSExchangeData data;
WriteDragData(press_pt, &data);
+// The Native Event is required for OSX's native drag and drop. As such, it's
+// necessary to pass down the Event object.
+#if defined(OS_MACOSX)
+ data.provider().SetEvent(event);
tapted 2016/05/24 08:06:02 So I'm still unsure about this. I found one place
spqchan 2016/05/26 01:56:55 Ahh, that's a really good point! I made a change s
+#endif
+
// Message the RootView to do the drag and drop. That way if we're removed
// the RootView can detect it and avoid calling us back.
gfx::Point widget_location(event.location());

Powered by Google App Engine
This is Rietveld 408576698