| 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 cbdf14be6fce24671d5518094cfd45320158823e..736c3b2e848b5dc714dab364beaab7a2da4c43cd 100644
|
| --- a/webrtc/modules/desktop_capture/window_capturer_mac.mm
|
| +++ b/webrtc/modules/desktop_capture/window_capturer_mac.mm
|
| @@ -77,52 +77,7 @@ WindowCapturerMac::WindowCapturerMac(
|
| WindowCapturerMac::~WindowCapturerMac() {}
|
|
|
| bool WindowCapturerMac::GetWindowList(WindowList* windows) {
|
| - // Only get on screen, non-desktop windows.
|
| - CFArrayRef window_array = CGWindowListCopyWindowInfo(
|
| - 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);
|
| - for (CFIndex i = 0; i < count; ++i) {
|
| - CFDictionaryRef window = reinterpret_cast<CFDictionaryRef>(
|
| - CFArrayGetValueAtIndex(window_array, i));
|
| - CFStringRef window_title = reinterpret_cast<CFStringRef>(
|
| - CFDictionaryGetValue(window, kCGWindowName));
|
| - CFNumberRef window_id = reinterpret_cast<CFNumberRef>(
|
| - CFDictionaryGetValue(window, kCGWindowNumber));
|
| - CFNumberRef window_layer = reinterpret_cast<CFNumberRef>(
|
| - CFDictionaryGetValue(window, kCGWindowLayer));
|
| - if (window_title && window_id && window_layer) {
|
| - // Skip windows with layer=0 (menu, dock).
|
| - int layer;
|
| - CFNumberGetValue(window_layer, kCFNumberIntType, &layer);
|
| - if (layer != 0)
|
| - continue;
|
| -
|
| - int id;
|
| - CFNumberGetValue(window_id, kCFNumberIntType, &id);
|
| -
|
| - // Skip windows that are minimized and not full screen.
|
| - if (IsWindowMinimized(id) &&
|
| - !IsWindowFullScreen(desktop_config, window)) { continue;}
|
| -
|
| - WindowCapturer::Window window;
|
| - window.id = id;
|
| - if (!rtc::ToUtf8(window_title, &(window.title)) ||
|
| - window.title.empty()) {
|
| - continue;
|
| - }
|
| - windows->push_back(window);
|
| - }
|
| - }
|
| -
|
| - CFRelease(window_array);
|
| - return true;
|
| + return webrtc::GetWindowList(windows);
|
| }
|
|
|
| bool WindowCapturerMac::SelectWindow(WindowId id) {
|
|
|