From de7db2d716871f927c7ae54830500e1f8086fc58 Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Fri, 30 May 2008 21:23:56 -0700 Subject: [PATCH] Sparkle now works correctly with LSUIElements: it focuses them before displaying the update alert. This fixes bug 228471. --- SUUserInitiatedUpdateDriver.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SUUserInitiatedUpdateDriver.m b/SUUserInitiatedUpdateDriver.m index 8adbff08..4dce586a 100644 --- a/SUUserInitiatedUpdateDriver.m +++ b/SUUserInitiatedUpdateDriver.m @@ -34,6 +34,9 @@ updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:updateItem hostBundle:hostBundle]; [updateAlert setDelegate:self]; + // If the app is a menubar app or the like, we need to focus it first: + if ([[hostBundle objectForInfoDictionaryKey:@"LSUIElement"] doubleValue]) { [NSApp activateIgnoringOtherApps:YES]; } + // Only show the update alert if the app is active; otherwise, we'll wait until it is. if ([NSApp isActive]) [updateAlert showWindow:self];