| Index: ash/magnifier/magnification_controller.cc
|
| diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
|
| index ba1de9ea68cacd83ae3e818984e1502404a54538..04cb8285790bd62552a8674a5107495a461ebaa1 100644
|
| --- a/ash/magnifier/magnification_controller.cc
|
| +++ b/ash/magnifier/magnification_controller.cc
|
| @@ -18,6 +18,7 @@
|
| #include "ui/compositor/layer.h"
|
| #include "ui/compositor/layer_animation_observer.h"
|
| #include "ui/compositor/scoped_layer_animation_settings.h"
|
| +#include "ui/gfx/point3_f.h"
|
| #include "ui/gfx/point_conversions.h"
|
| #include "ui/gfx/point_f.h"
|
| #include "ui/gfx/rect_conversions.h"
|
| @@ -38,6 +39,14 @@ const float kScrollScaleChangeFactor = 0.05f;
|
| // |kPanningMergin| from the edge, the view-port moves.
|
| const int kPanningMergin = 100;
|
|
|
| +void MoveCursorTo(aura::RootWindow* root_window,
|
| + const gfx::Point root_location) {
|
| + gfx::Point3F host_location_3f(root_location);
|
| + root_window->layer()->transform().TransformPoint(host_location_3f);
|
| + root_window->MoveCursorToInHost(
|
| + gfx::ToCeiledPoint(host_location_3f.AsPointF()));
|
| +}
|
| +
|
| } // namespace
|
|
|
| namespace ash {
|
| @@ -358,7 +367,7 @@ void MagnificationControllerImpl::OnMouseMove(const gfx::Point& location) {
|
| if (ret) {
|
| // If the magnified region is moved, hides the mouse cursor and moves it.
|
| if (x_diff != 0 || y_diff != 0)
|
| - root_window_->MoveCursorTo(mouse);
|
| + MoveCursorTo(root_window_, mouse);
|
| }
|
| }
|
| }
|
| @@ -418,7 +427,7 @@ void MagnificationControllerImpl::OnImplicitAnimationsCompleted() {
|
| return;
|
|
|
| if (move_cursor_after_animation_) {
|
| - root_window_->MoveCursorTo(position_after_animation_);
|
| + MoveCursorTo(root_window_, position_after_animation_);
|
| move_cursor_after_animation_ = false;
|
|
|
| aura::client::CursorClient* cursor_client =
|
|
|