CURSORINFO::ptScreenPos is in full desktop coordinate

So in MouseCursorMonitorWin, we do not need to translate it again.

Bug: webrtc:7950
Change-Id: I39145e8031f7eea2c2f07c0ba666e1f327d8609b
Reviewed-on: https://chromium-review.googlesource.com/651667
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Zijie He <zijiehe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19698}
This commit is contained in:
Zijie He
2017-09-05 15:13:51 -07:00
committed by Commit Bot
parent 8b476173d8
commit 340fba6ffb

View File

@ -138,6 +138,7 @@ void MouseCursorMonitorWin::Capture() {
if (mode_ != SHAPE_AND_POSITION)
return;
// CURSORINFO::ptScreenPos is in full desktop coordinate.
DesktopVector position(cursor_info.ptScreenPos.x, cursor_info.ptScreenPos.y);
bool inside = cursor_info.flags == CURSOR_SHOWING;
@ -165,8 +166,7 @@ void MouseCursorMonitorWin::Capture() {
// TODO(zijiehe): Remove this overload.
callback_->OnMouseCursorPosition(inside ? INSIDE : OUTSIDE, position);
callback_->OnMouseCursorPosition(
position.subtract(GetFullscreenRect().top_left()));
callback_->OnMouseCursorPosition(position);
}
DesktopRect MouseCursorMonitorWin::GetScreenRect() {