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

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

Issue 1426103005: Fixed window capute may end when window's full screen mode switchs on/off (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: change base on reviewer's comments Created 5 years, 1 month 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/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..54b2768aa803fe265d90a6b1f40884aafc795f88 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 or invisible, to match
+ // behavior on mace. Window can be temporarily invisible 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());
« 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