From d73b3745bfcf5e7d25a80c2c4babcb7676c5baf5 Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Thu, 11 Sep 2008 11:33:18 -0500 Subject: [PATCH] Fixes 268756 When determining LSUIElement status, Sparkle now asks the process manager instead of checking Info.plist; this'll support apps that change their LSUIElement status at runtime. --- SUHost.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SUHost.m b/SUHost.m index a9f82566..3f8f91db 100644 --- a/SUHost.m +++ b/SUHost.m @@ -93,7 +93,13 @@ - (BOOL)isBackgroundApplication { - return [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"LSUIElement"] doubleValue]; + ProcessSerialNumber PSN; + GetCurrentProcess(&PSN); + NSDictionary * processInfo = (NSDictionary *)ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask); + BOOL isElement = [[processInfo objectForKey:@"LSUIElement"] boolValue]; + if (processInfo) + CFRelease(processInfo); + return isElement; } - (NSString *)publicDSAKey