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

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: Only ignore cursor bitmap when host hides it 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..b9fecbb884f3c6bc25fde4800c7bf8e080a7a048 100644
--- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
+++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc
@@ -92,13 +92,17 @@ void MouseCursorMonitorWin::Capture() {
return;
}
- if (last_cursor_ != cursor_info.hCursor) {
- last_cursor_ = cursor_info.hCursor;
+ if (cursor_info.flags == CURSOR_SHOWING &&
Sergey Ulanov 2016/05/10 20:51:15 I still think that wont do the right thing. Partic
Sergey Ulanov 2016/05/10 20:58:12 Actually looking at this again I see your point -
Hzj_jie 2016/05/11 00:55:49 Done.
Hzj_jie 2016/05/11 00:55:49 Based on our discussion, we will do this, 1. Alway
+ 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