summaryrefslogtreecommitdiffstats
path: root/ash/magnifier
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 20:53:23 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 20:53:23 +0000
commit718b26cd02ffe63b82650e81cb9bb5b0634d62c7 (patch)
treea7b16b40dfe8f344b31b5c575c5acb61cb7f1af7 /ash/magnifier
parenta6b4ee0441f5e7199c583f924056dca14b889208 (diff)
downloadchromium_src-718b26cd02ffe63b82650e81cb9bb5b0634d62c7.zip
chromium_src-718b26cd02ffe63b82650e81cb9bb5b0634d62c7.tar.gz
chromium_src-718b26cd02ffe63b82650e81cb9bb5b0634d62c7.tar.bz2
Move last_mouse_location_ from aura::RootWindow to aura::Env to support multiple root windows.
BUG=136814 TEST=1) the new ash_unittests as well as existing tests passed. 2) ran ash_shell by './out/Release/ash_shell --ash-extended-desktop --aura-host-window-size=100+0-500x500,610+0-300x300 --ash-virtual-screen-coordinates', then move the cursor to the second (right hand side) window, then click the right button. confirmed that the popup menu is shown on the right window. Review URL: https://chromiumcodereview.appspot.com/10781028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/magnifier')
-rw-r--r--ash/magnifier/magnification_controller.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index d6d4556..ff2ea92 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -12,6 +12,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_property.h"
#include "ui/gfx/point3.h"
+#include "ui/gfx/screen.h"
#include "ui/compositor/dip_util.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_observer.h"
@@ -343,7 +344,7 @@ void MagnificationControllerImpl::SetScale(float scale, bool animate) {
// Try not to change the point which the mouse cursor indicates to.
const gfx::Rect window_rect = GetWindowRectDIP(scale);
- const gfx::Point mouse = root_window_->last_mouse_location();
+ const gfx::Point mouse = gfx::Screen::GetCursorScreenPoint();
const gfx::Point origin = gfx::Point(mouse.x() * (1.0f - 1.0f / scale),
mouse.y() * (1.0f - 1.0f / scale));
Redraw(origin, scale, animate);