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

Unified Diff: ash/wm/default_window_resizer.cc

Issue 10834097: Allow the user to drag a window from one display to another (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | ash/wm/window_resizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/default_window_resizer.cc
diff --git a/ash/wm/default_window_resizer.cc b/ash/wm/default_window_resizer.cc
index c0a71f25eae18f21731334d57512870c27f9154e..75c11d41e73b30aefa4549af2d23aed018c9721c 100644
--- a/ash/wm/default_window_resizer.cc
+++ b/ash/wm/default_window_resizer.cc
@@ -39,12 +39,15 @@ void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
// TODO(mazda|yusukes): Implement dragging an item from one display to another
aura::RootWindow* current_root = actual_location.first;
+ gfx::Point location_in_screen = actual_location.second;
+ wm::ConvertPointToScreen(current_root, &location_in_screen);
if (current_root != details_.window->GetRootWindow())
return;
int grid_size = event_flags & ui::EF_CONTROL_DOWN ?
0 : ash::Shell::GetInstance()->GetGridSize();
- gfx::Rect bounds(CalculateBoundsForDrag(details_, location, grid_size));
+ gfx::Rect bounds(
+ CalculateBoundsForDrag(details_, location_in_screen, grid_size));
sky 2012/08/06 20:45:03 Why are any of these in screen coordinates?
Yusuke Sato 2012/08/06 21:36:41 Thanks, it's better to keep using the original coo
if (bounds != details_.window->bounds()) {
did_move_or_resize_ = true;
details_.window->SetBounds(bounds);
« no previous file with comments | « no previous file | ash/wm/window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698