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:
@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user