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

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: formatting 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
« no previous file with comments | « webrtc/modules/desktop_capture/mac/window_list_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..22061edbe7ac4e770fcaf7fec52aa8b0006c58cc 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,
+ 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,11 @@ bool WindowCapturerMac::GetWindowList(WindowList* windows) {
int id;
CFNumberGetValue(window_id, kCFNumberIntType, &id);
+
+ // Skip windows that are minimized and not full screen.
+ if (IsWindowMinimized(id) &&
+ !IsWindowFullScreen(desktop_config, window)) { continue;}
Sergey Ulanov 2016/01/20 00:16:25 nit: move continue to a separate line. It's allowe
+
WindowCapturer::Window window;
window.id = id;
if (!rtc::ToUtf8(window_title, &(window.title)) ||
« no previous file with comments | « webrtc/modules/desktop_capture/mac/window_list_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698