Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc

Issue 1959863002: CURSORINFO.flags should be checked before capturing its bitmap (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
diff --git a/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc b/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
index 204bb00b1602f9d32344e7f0da6145244e1979ca..e29f00dc1bda37627503d5b164d7e8b4eaf1cf9c 100644
--- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
+++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
@@ -92,13 +92,20 @@ void MouseCursorMonitorWin::Capture() {
return;
}
+ if (cursor_info.flags != CURSOR_SHOWING) {
joedow 2016/05/09 17:14:05 Do any clients rely on receiving the bitmap when t
Hzj_jie 2016/05/10 00:40:58 I believe other platform won't be impacted, they d
Hzj_jie 2016/05/10 18:15:22 Done.
Hzj_jie 2016/05/10 18:15:22 Done.
+ return;
Sergey Ulanov 2016/05/10 17:17:07 I see two issues with this fix: 1. This code is u
Hzj_jie 2016/05/10 18:15:22 The following logic (after if (mode_ != SHAPE_AND_
+ }
+
if (last_cursor_ != cursor_info.hCursor) {
- last_cursor_ = cursor_info.hCursor;
// Note that |cursor_info.hCursor| does not need to be freed.
std::unique_ptr<MouseCursor> cursor(
CreateMouseCursorFromHCursor(desktop_dc_, cursor_info.hCursor));
- if (cursor.get())
+ if (cursor) {
+ last_cursor_ = cursor_info.hCursor;
callback_->OnMouseCursor(cursor.release());
+ } else {
+ last_cursor_ = NULL;
+ }
}
if (mode_ != SHAPE_AND_POSITION)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698