Show checking window back in focus and activate app if needed (#2150)

This commit is contained in:
Zorg authored and GitHub committed 2022-06-10 21:53:58 -07:00
1 parent 9080bebc88
commit f126876d35
1 file changed
+14
+14
View File
@@ -436,12 +436,26 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
- (void)showUpdateInFocus
{
BOOL mayNeedToActivateApp;
if (self.activeUpdateAlert != nil) {
[self setUpActiveUpdateAlertForScheduledUpdate:nil state:nil];
mayNeedToActivateApp = NO;
} else if (self.permissionPrompt != nil) {
[self.permissionPrompt showWindow:nil];
mayNeedToActivateApp = YES;
} else if (self.statusController != nil) {
[self.statusController showWindow:nil];
mayNeedToActivateApp = YES;
} else if (self.checkingController != nil) {
[self.checkingController showWindow:nil];
mayNeedToActivateApp = YES;
} else {
mayNeedToActivateApp = NO;
}
if (mayNeedToActivateApp && ![NSApp isActive]) {
// Make the app active if it's not already active, e.g, from a menu bar extra
[NSApp activateIgnoringOtherApps:YES];
}
}