From 70ae347896e1663364fc746645cd083a487c4b1b Mon Sep 17 00:00:00 2001 From: braveyao Date: Thu, 14 Dec 2017 14:13:15 -0800 Subject: [PATCH] [desktopCapture] remove reduntant check and fix comments error The title of Dock window on OSX10.12 is still 'Dock' with layer number 20. So the removed codes here is reduntant. Also fix a wrong comment. Bug: webrtc:8460 Change-Id: I72d4c8f5741a1ccb00aa45897f11e85af8d24e05 Reviewed-on: https://webrtc-review.googlesource.com/33123 Commit-Queue: Brave Yao Reviewed-by: Zijie He Cr-Commit-Position: refs/heads/master@{#21287} --- modules/desktop_capture/mac/window_list_utils.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/desktop_capture/mac/window_list_utils.cc b/modules/desktop_capture/mac/window_list_utils.cc index f73193ef3e..e919fec5fc 100644 --- a/modules/desktop_capture/mac/window_list_utils.cc +++ b/modules/desktop_capture/mac/window_list_utils.cc @@ -130,12 +130,6 @@ bool GetWindowList(rtc::FunctionView on_window, continue; } - // TODO(webrtc:8460): On 10.12, the name of the dock window is not "Dock" - // anymore. The following check should be removed soon or later. - if (CFStringCompare(window_title, CFSTR("Dock"), 0) == 0) { - continue; - } - CFNumberRef window_id = reinterpret_cast( CFDictionaryGetValue(window, kCGWindowNumber)); if (!window_id) { @@ -148,10 +142,7 @@ bool GetWindowList(rtc::FunctionView on_window, continue; } - // Skip windows with layer=0 (menu, dock). - // TODO(zijiehe): The windows with layer != 0 are skipped, is this a bug in - // code (not likely) or a bug in comments? What's the meaning of window - // layer number in the first place. + // Skip windows with layer!=0 (menu, dock). int layer; if (!CFNumberGetValue(window_layer, kCFNumberIntType, &layer)) { continue;