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

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: Review fixes 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..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)) ||

Powered by Google App Engine
This is Rietveld 408576698