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

Unified Diff: ash/wm/default_window_resizer.cc

Issue 10835047: Allow the cursor to warp even when a window is dragged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't check mouse lock status in display controller 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
Index: ash/wm/default_window_resizer.cc
diff --git a/ash/wm/default_window_resizer.cc b/ash/wm/default_window_resizer.cc
index 4368c73b88ba14b3230441fe40d1b8a83ebc0d22..c0a71f25eae18f21731334d57512870c27f9154e 100644
--- a/ash/wm/default_window_resizer.cc
+++ b/ash/wm/default_window_resizer.cc
@@ -5,6 +5,7 @@
#include "ash/wm/default_window_resizer.h"
#include "ash/shell.h"
+#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/cursor_manager.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
@@ -33,6 +34,14 @@ DefaultWindowResizer::Create(aura::Window* window,
}
void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
+ std::pair<aura::RootWindow*, gfx::Point> actual_location =
+ wm::GetRootWindowRelativeToWindow(details_.window->parent(), location);
+
+ // TODO(mazda|yusukes): Implement dragging an item from one display to another
+ aura::RootWindow* current_root = actual_location.first;
+ 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));

Powered by Google App Engine
This is Rietveld 408576698