diff options
author | thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-06-13 19:21:50 +0000 |
---|---|---|
committer | thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-06-13 19:21:50 +0000 |
commit | c53ec5520e39096e0804ce8d89a21378c0904481 (patch) | |
tree | d36a0055b59b1376d86c4ba4a01f9c479c2101a7 /AppKit/GTMNSWorkspace+ScreenSaver.m | |
parent | 80d493da05c8d461d74bfaa919ffc487be03ffe6 (diff) |
Landing a log of AppleScript/AppleEvent support code.
Landing GTMHTTPServer as a simple server but mainly for use in unittesting.
_GTMCompileAssert for doing compile time assertions to GTMDefines.h
Lots of improvments for UnitTesting, Dave's gonna put up a wiki page shortly with the full details of what can be done.
Diffstat (limited to 'AppKit/GTMNSWorkspace+ScreenSaver.m')
-rw-r--r-- | AppKit/GTMNSWorkspace+ScreenSaver.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/AppKit/GTMNSWorkspace+ScreenSaver.m b/AppKit/GTMNSWorkspace+ScreenSaver.m index 9e1eb6a..7ca5d70 100644 --- a/AppKit/GTMNSWorkspace+ScreenSaver.m +++ b/AppKit/GTMNSWorkspace+ScreenSaver.m @@ -20,6 +20,7 @@ #import <ScreenSaver/ScreenSaver.h> #import "GTMNSWorkspace+ScreenSaver.h" #import "GTMDefines.h" +#import "GTMGarbageCollection.h" // Interesting class descriptions extracted from ScreenSaver.framework using // class-dump. Note that these are "not documented". @@ -114,15 +115,14 @@ kProcessDictionaryIncludeAllInformationMask); require(cfProcessInfo, CantGetFrontProcess); - - NSString *bundlePath = [(NSDictionary*)cfProcessInfo objectForKey:@"BundlePath"]; - + NSDictionary *processInfo = [GTMNSMakeCollectable(cfProcessInfo) autorelease]; + NSString *bundlePath = [processInfo objectForKey:@"BundlePath"]; + // ScreenSaverEngine is the frontmost app if the screen saver is actually // running Security Agent is the frontmost app if the "enter password" // dialog is showing answer = [bundlePath hasSuffix:@"ScreenSaverEngine.app"] || [bundlePath hasSuffix:@"SecurityAgent.app"]; - CFRelease(cfProcessInfo); // COV_NF_END } CantGetFrontProcess: |