summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 10:37:49 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 10:37:49 +0000
commitfa80f7067d2d7ea0306f4b04194b50030adb92b3 (patch)
tree88952aad6dc028cd54b407834f34a5a68d1d916a /ui
parent7bdd7d7c830255436f0bd8b420e476915b277451 (diff)
downloadchromium_src-fa80f7067d2d7ea0306f4b04194b50030adb92b3.zip
chromium_src-fa80f7067d2d7ea0306f4b04194b50030adb92b3.tar.gz
chromium_src-fa80f7067d2d7ea0306f4b04194b50030adb92b3.tar.bz2
Fix the issue of cursor's device scale factor when primary monitor is swapped.
This CL makes cursor's device scale factor be set in RootWindow::MoveCursor. Thus cursor's device scale factor is updated properly even when cursor moves to another root window without cursor warp (e.g. when swapping primary display). BUG=157940 TEST=Manually check cursor's device scale factor is updated properly when swapping primary display for a display with a different device scale factor. Review URL: https://chromiumcodereview.appspot.com/11307019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/aura/root_window.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index d9e70ea..d269cd7 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -234,6 +234,9 @@ void RootWindow::MoveCursorTo(const gfx::Point& location_in_dip) {
layer()->transform().TransformPoint(location);
host_->MoveCursorTo(ui::ConvertPointToPixel(layer(), location));
SetLastMouseLocation(this, location_in_dip);
+ client::CursorClient* cursor_client = client::GetCursorClient(this);
+ if (cursor_client)
+ cursor_client->SetDeviceScaleFactor(GetDeviceScaleFactor());
}
bool RootWindow::ConfineCursorToWindow() {