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

Unified Diff: ash/drag_drop/drag_drop_controller.cc

Issue 10827392: Fix the issue of the dragged item always shown on the primary display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/drag_drop/drag_drop_controller.cc
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 445468a0fe287df2300f99bee6e7292194cccb90..c273bf09623bb54c149753992ff82f8da3c1f7bb 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -6,6 +6,7 @@
#include "ash/drag_drop/drag_image_view.h"
#include "ash/shell.h"
+#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/cursor_manager.h"
#include "base/message_loop.h"
#include "base/run_loop.h"
@@ -137,8 +138,11 @@ void DragDropController::DragUpdate(aura::Window* target,
DCHECK(drag_image_.get());
if (drag_image_->visible()) {
+ gfx::Point root_location_in_screen = event.root_location();
+ ash::wm::ConvertPointToScreen(target->GetRootWindow(),
+ &root_location_in_screen);
drag_image_->SetScreenPosition(
- event.root_location().Subtract(drag_image_offset_));
+ root_location_in_screen.Subtract(drag_image_offset_));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698