Chromium Code Reviews| Index: webrtc/modules/desktop_capture/window_capturer_win.cc |
| diff --git a/webrtc/modules/desktop_capture/window_capturer_win.cc b/webrtc/modules/desktop_capture/window_capturer_win.cc |
| index c0d71167a54d8ae99f602062764a59357dba9c84..69f74f48268718dd0c0587fa9401bc442cfd2dbb 100644 |
| --- a/webrtc/modules/desktop_capture/window_capturer_win.cc |
| +++ b/webrtc/modules/desktop_capture/window_capturer_win.cc |
| @@ -156,15 +156,16 @@ void WindowCapturerWin::Capture(const DesktopRegion& region) { |
| return; |
| } |
| - // Stop capturing if the window has been closed or hidden. |
| - if (!IsWindow(window_) || !IsWindowVisible(window_)) { |
| + // Stop capturing if the window has been closed. |
| + if (!IsWindow(window_)) { |
| callback_->OnCaptureCompleted(NULL); |
| return; |
| } |
| - // Return a 1x1 black frame if the window is minimized, to match the behavior |
| - // on Mac. |
| - if (IsIconic(window_)) { |
| + // Return a 1x1 black frame if the window is minimized to match the behavior |
| + // on Mac, or if window is invisible. Window can be temporarily invisible |
|
Sergey Ulanov
2015/11/09 21:27:40
reword first sentence:
// Return a 1x1 black fram
GeorgeZ
2015/11/09 21:59:06
Done.
|
| + // during the transition of full screen mode on/off. |
| + if (IsIconic(window_) || !IsWindowVisible(window_)) { |
| BasicDesktopFrame* frame = new BasicDesktopFrame(DesktopSize(1, 1)); |
| memset(frame->data(), 0, frame->stride() * frame->size().height()); |