Fix initial hiding and centering cursor on ChromeOS
commit04bbbd5582af60920656cc9768d2ac4e03709b69
authorpkotwicz <pkotwicz@chromium.org>
Mon, 2 Mar 2015 16:16:58 +0000 (2 08:16 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 2 Mar 2015 16:17:49 +0000 (2 16:17 +0000)
treea717db70e8c926970a332d4674ab81b04403bf49
parent131c261d70fa545906b7493bf5b6e896f9d4e95b
Fix initial hiding and centering cursor on ChromeOS

DisplayController::UpdateMouseLocationAfterDisplayChange() is now called during
startup:
- In Ozone once a channel to the GPU has been established
- In X11 as a result of
  DisplayChangeObserver::OnTouchscreenDeviceConfigurationChanged()

Moving the mouse on startup:
- Causes side effects such as mouse hover
- Causes a mouse event to be generated which causes
  CompoundEventFilter::SetCursorVisibilityOnEvent() to show the
  mouse cursor.

This CL makes DisplayController::UpdateMouseLocationAfterDisplayChange() move the
mouse only if necessary.

BUG=450860
TEST=Manual, see bug

Review URL: https://codereview.chromium.org/902123002

Cr-Commit-Position: refs/heads/master@{#318708}
ash/display/display_controller.cc
ash/display/display_controller.h