Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
fix: when switching desktops with spaces, check if window is obscured…
Browse files Browse the repository at this point in the history
… delayed (fixes #19)
  • Loading branch information
HBehrens committed Jun 25, 2013
1 parent dfcfd73 commit 2018497
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CamHolderApp/CHApplicationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,10 @@ -(void)applicationDidResignActive:(NSNotification *)notification {
[self periodicallyTryToReduceRunningCaptureSessionsWhileApplicationIsNotActive];
}

-(void)applicationDidBecomeActive:(NSNotification *)notification {
[self tryToReduceRunningCaptureSessions];
- (void)applicationDidBecomeActive:(NSNotification *)aNotification {
// when using spaces, windows might still be obscured during transition. Hence, wait a bit
// NOTE: is there any callback to determine when exactly?
[self performSelector:@selector(tryToReduceRunningCaptureSessions) withObject:0 afterDelay:0.5];
}

-(BOOL)shouldPeriodicallyTryToReduceRunningCaptureSessions {
Expand Down

0 comments on commit 2018497

Please sign in to comment.