[UI] [Win] Fix scaling constant in mouse move
To convert from screen coordinates to the normalized absolute coordinates dimensions used by SendInput, the scaling factor should be (65536.0 / screen_dimension). Previously, we used (65535.0 / (screen_dimension - 1)). Although the difference between these two factors is small, the discrepancy becomes more prominent when it's multiplied out. This discrepancy may lead to the computed absolute coordinates being off by a pixel or two depending on the resolution of the screen in question. Change-Id: Id305abc6ddf904ffbbb07dc740c655ac1be3cf83 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2278347Reviewed-by:David Bienvenu <davidbienvenu@chromium.org> Reviewed-by:
Scott Violet <sky@chromium.org> Reviewed-by:
Greg Thompson <grt@chromium.org> Commit-Queue: Chege Gitau <dagitau@microsoft.com> Cr-Commit-Position: refs/heads/master@{#786075}
Showing
Please register or sign in to comment