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..1d36e850524db3a5dd5520666ad107a90853b4d4 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, |
+ kCGWindowListOptionAll | kCGWindowListExcludeDesktopElements, |
Sergey Ulanov
2016/01/13 22:34:03
kCGWindowListOptionAll is 0. Maybe just removed it
niklas.enbom
2016/01/14 23:47:05
Acknowledged.
|
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,16 @@ bool WindowCapturerMac::GetWindowList(WindowList* windows) { |
int id; |
CFNumberGetValue(window_id, kCFNumberIntType, &id); |
+ |
+ // Skip windows that are minimized and not full screen. |
+ bool fullScreen = FullScreenChromeWindowDetector::IsWindowFullScreen( |
Sergey Ulanov
2016/01/13 22:34:04
nit: fullscreen or full_screen
niklas.enbom
2016/01/14 23:47:05
variable not needed any longer.
On 2016/01/13 22:3
|
+ desktop_config, |
+ window); |
+ bool minimized = FullScreenChromeWindowDetector::IsWindowMinimized(id); |
+ if (!fullScreen && minimized) { |
Sergey Ulanov
2016/01/13 22:34:04
"minimized && !fullscreen" would be more readable
niklas.enbom
2016/01/14 23:47:05
Acknowledged.
|
+ continue; |
+ } |
+ |
WindowCapturer::Window window; |
window.id = id; |
if (!rtc::ToUtf8(window_title, &(window.title)) || |