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.
This commit is contained in:
Andy Matuschak committed 2008-09-11 11:33:18 -05:00
1 parent ccd44c0cb2
commit d73b3745bf
1 file changed
+7 -1
+7 -1
View File
@@ -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