Commit f1f2330b authored by James Hollyer's avatar James Hollyer Committed by Commit Bot

Only stop the moving to center with Unadjusted Movement on windows

On Windows we grab the raw mouse movements and stop actually moving the
mouse when in unadjusted movement so moving to the center does not make
sense.  However, on ChromeOS and Linux we temporarily turn off mouse
Acceleration in the settings and keep the mouse moving like normal so
The move to center calculation should not change.

Bug: 1119468
Change-Id: Ib318627340df98f55205f4489084d88c89a7fd37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2373447Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801295}
parent 57a14d39
...@@ -994,8 +994,10 @@ bool RenderWidgetHostViewEventHandler::ShouldMoveToCenter( ...@@ -994,8 +994,10 @@ bool RenderWidgetHostViewEventHandler::ShouldMoveToCenter(
gfx::PointF mouse_screen_position) { gfx::PointF mouse_screen_position) {
// Do not need to move to center in unadjusted movement mode as // Do not need to move to center in unadjusted movement mode as
// the movement value are directly from OS. // the movement value are directly from OS.
#if defined(OS_WIN)
if (mouse_locked_unadjusted_movement_) if (mouse_locked_unadjusted_movement_)
return false; return false;
#endif
gfx::Rect rect = window_->bounds(); gfx::Rect rect = window_->bounds();
rect = delegate_->ConvertRectToScreen(rect); rect = delegate_->ConvertRectToScreen(rect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment