Activate app if update check is initiated from NSStatusItem (#2950)

This commit is contained in:
Niklas Wenzel authored and Zorg committed 2026-11-15 20:11:57 -08:00
1 parent 1967167890
commit 5014eb5e63
1 file changed
+4 -3
+4 -3
View File
@@ -549,9 +549,10 @@
[_checkingController beginActionWithTitle:SULocalizedStringFromTableInBundle(@"Checking for updates…", SPARKLE_TABLE, sparkleBundle, nil) maxProgressValue:0.0 statusText:nil];
[_checkingController setButtonTitle:SULocalizedStringFromTableInBundle(@"Cancel", SPARKLE_TABLE, sparkleBundle, nil) target:self action:@selector(cancelCheckForUpdates:) isDefault:NO accessibilityIdentifier:@"SUStatusCancel"];
// For background applications, obtain focus.
// Useful if the update check is requested from another app like System Preferences.
if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) {
// Obtain focus. Useful if:
// - The update check is requested from another app (e.g. System Preferences)
// - The user triggers the update check from an NSStatusItem (which does not activate the app)
if (![NSApp isActive]) {
[self _activateApplication];
}