summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 23:40:44 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 23:40:44 +0000
commit9da1aedb530674195ee3d5c13d1d73c3ea2949b2 (patch)
tree3ac653d24ef2056d469321d0affb572195ffe4a5
parentf279a8cd577bac444c33b1dc9ba34cc20368d4f2 (diff)
downloadchromium_src-9da1aedb530674195ee3d5c13d1d73c3ea2949b2.zip
chromium_src-9da1aedb530674195ee3d5c13d1d73c3ea2949b2.tar.gz
chromium_src-9da1aedb530674195ee3d5c13d1d73c3ea2949b2.tar.bz2
Make sure it reshow the cursor if it's hidden during scale factor change.
BUG=156993 TEST=manual: see bug for repro step Review URL: https://codereview.chromium.org/11289002 git-svn-id: svn://svn.chromium.org/chrome/branches/1271/src@164216 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/aura/root_window.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 95eeee1..88be561 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -525,7 +525,8 @@ void RootWindow::OnDeviceScaleFactorChanged(
float device_scale_factor) {
const bool cursor_is_in_bounds =
GetBoundsInScreen().Contains(Env::GetInstance()->last_mouse_location());
- if (cursor_is_in_bounds && cursor_shown_)
+ bool cursor_shown = cursor_shown_;
+ if (cursor_is_in_bounds && cursor_shown)
ShowCursor(false);
host_->OnDeviceScaleFactorChanged(device_scale_factor);
Window::OnDeviceScaleFactorChanged(device_scale_factor);
@@ -536,7 +537,7 @@ void RootWindow::OnDeviceScaleFactorChanged(
if (cursor_client)
cursor_client->SetDeviceScaleFactor(device_scale_factor);
}
- if (cursor_is_in_bounds && cursor_shown_)
+ if (cursor_is_in_bounds && cursor_shown)
ShowCursor(true);
}