From 1ec540d5378e6e882a8341c47e682dba0012ee1d Mon Sep 17 00:00:00 2001 From: Zorg Date: Wed, 1 Jul 2026 20:24:09 -0700 Subject: [PATCH] Use activateIgnoringOtherApps: again for backgrounded apps (#2890) --- Sparkle/SPUStandardUserDriver.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Sparkle/SPUStandardUserDriver.m b/Sparkle/SPUStandardUserDriver.m index 9562e8a4..0369779a 100644 --- a/Sparkle/SPUStandardUserDriver.m +++ b/Sparkle/SPUStandardUserDriver.m @@ -128,11 +128,10 @@ - (void)_activateApplication SPU_OBJC_DIRECT { - if (@available(macOS 14, *)) { - [NSApp activate]; - } else { - [NSApp activateIgnoringOtherApps:YES]; - } + // -[NSApp activate] does not always work reliably from backgrounded apps when the user initiates checks for updates + // from e.g. a menu bar. The OS should grant active focus to the appliation, but it is inconsistent (last tested on 26.5.1). + // For now we will prefer the deprecated more reliant API + [NSApp activateIgnoringOtherApps:YES]; } - (void)showUpdatePermissionRequest:(SPUUpdatePermissionRequest *)request reply:(void (^)(SUUpdatePermissionResponse *))reply