Skip to content

Commit

Permalink
Warp:
Browse files Browse the repository at this point in the history
Fixed Warping at screensaver unlock screen.
  • Loading branch information
ksuther committed Jun 1, 2008
1 parent 3c87b00 commit 8e8c945
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions MainController.m
Expand Up @@ -193,23 +193,19 @@ + (BOOL)requiredModifiersDown
return _activationModifiers == 0 || (GetCurrentKeyModifiers() & _activationModifiers) == _activationModifiers; return _activationModifiers == 0 || (GetCurrentKeyModifiers() & _activationModifiers) == _activationModifiers;
} }


+ (BOOL)isScreenSaverRunning + (BOOL)isSecurityAgentActive
{ {
BOOL running = NO; ProcessSerialNumber psn;
ProcessSerialNumber number; BOOL active = NO;
number.highLongOfPSN = kNoProcess;
number.lowLongOfPSN = 0; if (GetFrontProcess(&psn) == noErr) {

while ( (GetNextProcess(&number) == noErr) ) {
CFStringRef name; CFStringRef name;
if ((CopyProcessName(&number, &name) == noErr) && [(NSString *)name isEqualToString:@"ScreenSaverEngine"] && [[ScreenSaverController controller] screenSaverIsRunning]) { CopyProcessName(&psn, &name);
running = YES; active = [(NSString *)name isEqualToString:@"SecurityAgent"];
break;
}
[(NSString *)name release]; [(NSString *)name release];
} }


return running; return active;
} }


+ (NSInteger)getCurrentSpaceRow:(NSInteger *)row column:(NSInteger *)column + (NSInteger)getCurrentSpaceRow:(NSInteger *)row column:(NSInteger *)column
Expand Down Expand Up @@ -343,7 +339,7 @@ + (void)timerFired:(NSTimer *)timer


+ (void)warpInDirection:(NSUInteger)direction edge:(Edge *)edge + (void)warpInDirection:(NSUInteger)direction edge:(Edge *)edge
{ {
if (!_timeMachineActive && ![self isScreenSaverRunning]) { if (!_timeMachineActive && ![self isSecurityAgentActive]) {
CGPoint mouseLocation, warpLocation; CGPoint mouseLocation, warpLocation;
NSInteger row, col; NSInteger row, col;
BOOL switchedSpace = NO; BOOL switchedSpace = NO;
Expand Down

0 comments on commit 8e8c945

Please sign in to comment.