From 1573a92150b42df0c5db7f19d2c79a940369089e Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 18 Mar 2024 14:23:43 +0100 Subject: [PATCH] macOS: Remove usage of deprecated API `NSApplicationActivateIgnoringOtherApps` is deprecated and doesn't have any effect any more. Switch this to `NSApplicationActivateAllWindows` which we actually want when running an application, and remove an unneeded cast. Change-Id: I75849533e4b172db577d5484ef12c8ee4df20d59 Reviewed-by: Reviewed-by: Marcus Tillmanns --- src/libs/utils/processhandle_mac.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/utils/processhandle_mac.mm b/src/libs/utils/processhandle_mac.mm index 52cc0d3e077..f492dae37d3 100644 --- a/src/libs/utils/processhandle_mac.mm +++ b/src/libs/utils/processhandle_mac.mm @@ -10,8 +10,7 @@ bool ProcessHandle::activate() { NSRunningApplication *app = [NSRunningApplication runningApplicationWithProcessIdentifier:pid()]; - return app && [app activateWithOptions:static_cast( - NSApplicationActivateIgnoringOtherApps)]; + return app && [app activateWithOptions:NSApplicationActivateAllWindows]; } } // Utils