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

Unified Diff: webrtc/modules/desktop_capture/window_capturer_mac.mm

Issue 1579213007: Enable fullscreen windows to be shown in mac window share picker (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added missing comment Created 4 years, 11 months 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
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..78096f72e44d8d1fc2807e1d62853423e05b445d 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,
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.
+ bool fullScreen = FullScreenChromeWindowDetector::IsWindowFullScreen(
+ desktop_config,
+ window);
+ bool minimized = FullScreenChromeWindowDetector::IsWindowMinimized(id);
+ if (!fullScreen && minimized) {
+ continue;
GeorgeZ 2016/01/13 21:35:31 My understanding is that when a window is full scr
niklas.enbom 2016/01/13 21:56:45 Acknowledged.
+ }
+
WindowCapturer::Window window;
window.id = id;
if (!rtc::ToUtf8(window_title, &(window.title)) ||

Powered by Google App Engine
This is Rietveld 408576698