Revision: 2524
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2524&view=rev
Author:   hofman
Date:     2007-07-18 01:44:28 -0700 (Wed, 18 Jul 2007)

Log Message:
-----------
Also disable flushing during CG transition animations.

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

Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m      2007-07-18 00:10:34 UTC (rev 2523)
+++ trunk/SKTransitionController.m      2007-07-18 08:44:28 UTC (rev 2524)
@@ -209,7 +209,12 @@
 }
 
 - 
(void)prepareForAnimationWithTransitionStyle:(SKAnimationTransitionStyle)transitionStyle
 fromRect:(NSRect)rect {
-       if (transitionStyle >= SKCopyMachineTransition) {
+       if (transitionStyle == SKNoTransition) {
+
+       } else if (transitionStyle < SKCopyMachineTransition) {
+        // We don't want the window to draw the next state before the 
animation is run
+        [[view window] disableFlushWindow];
+    } else {
         NSRect bounds = [view bounds];
         [initialImage release];
         NSBitmapImageRep *initialContentBitmap = [view 
bitmapImageRepForCachingDisplayInRect:bounds];
@@ -239,7 +244,7 @@
         spec.backColour = NULL;
         spec.wid = [[view window] windowNumber];
         
-        // Let’s get a connection
+        // Let's get a connection
         CGSConnection cgs = _CGSDefaultConnection();
         
         // Create a transition
@@ -247,6 +252,9 @@
         
         // Redraw the window
         [[view window] display];
+        // Remember we disabled flushing in the previous method, we need to 
balance that.
+        [[view window] enableFlushWindow];
+        [[view window] flushWindow];
         
         CGSInvokeTransition(cgs, handle, duration);
         // We need to wait for the transition to finish before we get rid of 
it, otherwise we’ll get all sorts of nasty errors... or maybe not.


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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to