* be more accurate when fading in and out (refs #913 and hopefully fixes it)
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 26 Dec 2006 13:22:37 +0000 (13:22 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 26 Dec 2006 13:22:37 +0000 (13:22 +0000)
modules/gui/macosx/fspanel.m
modules/gui/macosx/vout.m

index 76e28dd..61b113f 100644 (file)
 {\r
     b_nonActive = YES;\r
     [self orderOut: self];\r
+    \r
+    /* here's fadeOut, just without visibly fading */\r
+    b_displayed = NO;\r
+    [self setAlphaValue:0.0];\r
+    [self setFadeTimer:nil];\r
+    b_fadeQueued = NO;\r
 }\r
 \r
 - (void)setActive:(id)noData\r
 {\r
-    b_nonActive = NO;\r
-    [self orderFront: self];\r
+    if( [[[[VLCMain sharedInstance] getControls] getVoutView] isFullscreen] )\r
+    {\r
+        b_nonActive = NO;\r
+        [self fadeIn];\r
+    }\r
 }\r
 \r
 /* This routine is called repeatedly to fade in the window */\r
     if(! config_GetInt( VLCIntf, "macosx-fspanel" ) || b_nonActive )\r
         return;\r
     \r
-    if( [self alphaValue] < 1.0 )\r
+    [self orderFront: nil];\r
+    \r
+    if( [self alphaValue] < 1.0 || b_displayed != YES )\r
     {\r
         if (![self fadeTimer])\r
             [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(focus:) userInfo:[NSNumber numberWithShort:1] repeats:YES]];\r
index 3e7e873..6e07a55 100644 (file)
@@ -385,9 +385,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     val.b_bool = !val.b_bool;
     var_Set( p_real_vout, "fullscreen", val );
     if( [self isFullscreen] )
-        [[[[VLCMain sharedInstance] getControls] getFSPanel] orderFront: self];
+        [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
     else
-        [[[[VLCMain sharedInstance] getControls] getFSPanel] orderOut: self];
+        [[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
 }
 
 - (BOOL)isFullscreen