Skip to content
Browse files

Warp:

Fixed Warping at screensaver unlock screen.
  • Loading branch information...
1 parent 3c87b00 commit 8e8c945e7e27ac9fefc510db7ea2b1d980f39f76 @ksuther committed Jun 1, 2008
Showing with 9 additions and 13 deletions.
  1. +9 −13 MainController.m
View
22 MainController.m
@@ -193,23 +193,19 @@ + (BOOL)requiredModifiersDown
return _activationModifiers == 0 || (GetCurrentKeyModifiers() & _activationModifiers) == _activationModifiers;
}
-+ (BOOL)isScreenSaverRunning
++ (BOOL)isSecurityAgentActive
{
- BOOL running = NO;
- ProcessSerialNumber number;
- number.highLongOfPSN = kNoProcess;
- number.lowLongOfPSN = 0;
-
- while ( (GetNextProcess(&number) == noErr) ) {
+ ProcessSerialNumber psn;
+ BOOL active = NO;
+
+ if (GetFrontProcess(&psn) == noErr) {
CFStringRef name;
- if ((CopyProcessName(&number, &name) == noErr) && [(NSString *)name isEqualToString:@"ScreenSaverEngine"] && [[ScreenSaverController controller] screenSaverIsRunning]) {
- running = YES;
- break;
- }
+ CopyProcessName(&psn, &name);
+ active = [(NSString *)name isEqualToString:@"SecurityAgent"];
[(NSString *)name release];
}
- return running;
+ return active;
}
+ (NSInteger)getCurrentSpaceRow:(NSInteger *)row column:(NSInteger *)column
@@ -343,7 +339,7 @@ + (void)timerFired:(NSTimer *)timer
+ (void)warpInDirection:(NSUInteger)direction edge:(Edge *)edge
{
- if (!_timeMachineActive && ![self isScreenSaverRunning]) {
+ if (!_timeMachineActive && ![self isSecurityAgentActive]) {
CGPoint mouseLocation, warpLocation;
NSInteger row, col;
BOOL switchedSpace = NO;

0 comments on commit 8e8c945

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