From bbf27e00812981ef8cfa6ec9ed2b01b60cd8d4ff Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Thu, 21 Sep 2023 23:13:50 +0200 Subject: [PATCH] Remove NSApplicationActivateIgnoringOtherApps NSApplicationActivateIgnoringOtherApps is about to be deprecated. The default behavior is good enough. Tested on Chrome using https://wicg.github.io/conditional-focus/demo/ Bug: webrtc:15511 Change-Id: I1f59aea3d4e7c4942d17ee5c4f1b6c2d398016ee Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321080 Commit-Queue: Johannes Kron Reviewed-by: Mark Foltz Auto-Submit: Johannes Kron Cr-Commit-Position: refs/heads/main@{#40795} --- modules/desktop_capture/window_capturer_mac.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/desktop_capture/window_capturer_mac.mm b/modules/desktop_capture/window_capturer_mac.mm index f99b4a74d1..56c94baada 100644 --- a/modules/desktop_capture/window_capturer_mac.mm +++ b/modules/desktop_capture/window_capturer_mac.mm @@ -127,8 +127,7 @@ bool WindowCapturerMac::FocusOnSelectedSource() { // TODO(jiayl): this will bring the process main window to the front. We // should find a way to bring only the window to the front. bool result = - [[NSRunningApplication runningApplicationWithProcessIdentifier: pid] - activateWithOptions: NSApplicationActivateIgnoringOtherApps]; + [[NSRunningApplication runningApplicationWithProcessIdentifier:pid] activateWithOptions:0]; CFRelease(window_id_array); CFRelease(window_array);