Index: webrtc/modules/desktop_capture/window_capturer_mac.mm |
diff --git a/webrtc/modules/desktop_capture/window_capturer_mac.mm b/webrtc/modules/desktop_capture/window_capturer_mac.mm |
index 806fc5c1d4be028b96425852e94d5db7585c6204..22061edbe7ac4e770fcaf7fec52aa8b0006c58cc 100644 |
--- a/webrtc/modules/desktop_capture/window_capturer_mac.mm |
+++ b/webrtc/modules/desktop_capture/window_capturer_mac.mm |
@@ -82,11 +82,12 @@ WindowCapturerMac::~WindowCapturerMac() { |
bool WindowCapturerMac::GetWindowList(WindowList* windows) { |
// Only get on screen, non-desktop windows. |
CFArrayRef window_array = CGWindowListCopyWindowInfo( |
- kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements, |
+ kCGWindowListExcludeDesktopElements, |
kCGNullWindowID); |
if (!window_array) |
return false; |
- |
+ MacDesktopConfiguration desktop_config = MacDesktopConfiguration::GetCurrent( |
+ MacDesktopConfiguration::TopLeftOrigin); |
// Check windows to make sure they have an id, title, and use window layer |
// other than 0. |
CFIndex count = CFArrayGetCount(window_array); |
@@ -108,6 +109,11 @@ bool WindowCapturerMac::GetWindowList(WindowList* windows) { |
int id; |
CFNumberGetValue(window_id, kCFNumberIntType, &id); |
+ |
+ // Skip windows that are minimized and not full screen. |
+ if (IsWindowMinimized(id) && |
+ !IsWindowFullScreen(desktop_config, window)) { continue;} |
Sergey Ulanov
2016/01/20 00:16:25
nit: move continue to a separate line. It's allowe
|
+ |
WindowCapturer::Window window; |
window.id = id; |
if (!rtc::ToUtf8(window_title, &(window.title)) || |