Skip to content
Browse files

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.
  • Loading branch information...
1 parent ccd44c0 commit d73b3745bfcf5e7d25a80c2c4babcb7676c5baf5 @andymatuschak andymatuschak committed Sep 11, 2008
Showing with 7 additions and 1 deletion.
  1. +7 −1 SUHost.m
View
8 SUHost.m
@@ -93,7 +93,13 @@ - (BOOL)isRunningOnReadOnlyVolume
- (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

0 comments on commit d73b374

Please sign in to comment.
Something went wrong with that request. Please try again.