Revision: 5766
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5766&view=rev
Author:   hofman
Date:     2009-09-19 22:02:54 +0000 (Sat, 19 Sep 2009)

Log Message:
-----------
reset flag for fading out fullscreen window in animation delegate so we're sure 
the animation finished

Modified Paths:
--------------
    trunk/SKMainWindowController.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2009-09-19 22:02:09 UTC (rev 5765)
+++ trunk/SKMainWindowController.m      2009-09-19 22:02:54 UTC (rev 5766)
@@ -1565,13 +1565,15 @@
 }
 
 - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag {
-    mwcFlags.isFadingOut = 0;
+    if ([theAnimation isKindOfClass:[CATransition class]]) {
+        mwcFlags.isFadingOut = 0;
+    } else {
+        [fullScreenWindow orderOut:nil];
+        mwcFlags.isChangingFullScreen = 0;
+    }
+    [theAnimation setDelegate:nil];
 }
 
-- (void)finishFadeOut {
-    mwcFlags.isChangingFullScreen = 0;
-}
-
 - (IBAction)exitFullScreen:(id)sender {
     if ([self isFullScreen] == NO && [self isPresentation] == NO)
         return;
@@ -1639,15 +1641,14 @@
     [self setWindow:mainWindow];
     [mainWindow orderWindow:NSWindowBelow relativeTo:[fullScreenWindow 
windowNumber]];
     [mainWindow display];
-    [fullScreenWindow fadeOut];
+    [[[fullScreenWindow animations] valueForKey:@"alphaValue"] 
setDelegate:self];
+    [[fullScreenWindow animator] setAlphaValue:0.0];
     [mainWindow makeFirstResponder:pdfView];
     [mainWindow recalculateKeyViewLoop];
     [mainWindow setDelegate:self];
     [mainWindow makeKeyWindow];
     
     [blankingWindows makeObjectsPerformSelector:@selector(fadeOut)];
-    
-    [self performSelector:@selector(finishFadeOut) withObject:nil 
afterDelay:0.5];
 }
 
 #pragma mark Swapping tables


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to