Chromium Code Reviews| 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) |