Index: ui/aura/root_window.cc |
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc |
index 968a25ce6edd18ff3a3bcac12f54f85e287bc8aa..1c58d51f071eea3ce1d00ad3115188b7c4e691ef 100644 |
--- a/ui/aura/root_window.cc |
+++ b/ui/aura/root_window.cc |
@@ -289,16 +289,28 @@ void RootWindow::OnMouseEventsEnableStateChanged(bool enabled) { |
} |
void RootWindow::MoveCursorTo(const gfx::Point& location_in_dip) { |
- gfx::Point3F point_3f(location_in_dip); |
- GetRootTransform().TransformPoint(point_3f); |
- host_->MoveCursorTo(gfx::ToFlooredPoint(point_3f.AsPointF())); |
- SetLastMouseLocation(this, location_in_dip); |
+ gfx::Point host_location(location_in_dip); |
+ ConvertPointToHost(&host_location); |
+ MoveCursorToInternal(location_in_dip, host_location); |
+} |
+ |
+void RootWindow::MoveCursorToHostLocation(const gfx::Point& host_location) { |
+ gfx::Point root_location(host_location); |
+ ConvertPointFromHost(&root_location); |
+ MoveCursorToInternal(root_location, host_location); |
+} |
+ |
+void RootWindow::MoveCursorToInternal( |
sky
2013/04/25 18:16:24
Make position match header, and when you wrap each
yoshiki
2013/04/25 18:46:40
Done.
|
+ const gfx::Point& root_location, const gfx::Point& host_location) { |
+ host_->MoveCursorTo(host_location); |
+ SetLastMouseLocation(this, root_location); |
client::CursorClient* cursor_client = client::GetCursorClient(this); |
if (cursor_client) { |
const gfx::Display& display = |
gfx::Screen::GetScreenFor(this)->GetDisplayNearestWindow(this); |
cursor_client->SetDisplay(display); |
} |
+ synthesize_mouse_move_ = false; |
} |
bool RootWindow::ConfineCursorToWindow() { |