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