From 340fba6ffb4533a0b5f0e2b3775422516fbcf6ac Mon Sep 17 00:00:00 2001 From: Zijie He Date: Tue, 5 Sep 2017 15:13:51 -0700 Subject: [PATCH] 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 Commit-Queue: Zijie He Cr-Commit-Position: refs/heads/master@{#19698} --- webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc b/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc index 43174cb08b..174036e559 100644 --- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc +++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc @@ -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() {