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..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) |