Commit c17c4753 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* be more accurate when fading in and out (refs #913 and hopefully fixes it)

parent adfd51f8
......@@ -157,12 +157,21 @@
{
b_nonActive = YES;
[self orderOut: self];
/* here's fadeOut, just without visibly fading */
b_displayed = NO;
[self setAlphaValue:0.0];
[self setFadeTimer:nil];
b_fadeQueued = NO;
}
- (void)setActive:(id)noData
{
b_nonActive = NO;
[self orderFront: self];
if( [[[[VLCMain sharedInstance] getControls] getVoutView] isFullscreen] )
{
b_nonActive = NO;
[self fadeIn];
}
}
/* This routine is called repeatedly to fade in the window */
......@@ -235,7 +244,9 @@
if(! config_GetInt( VLCIntf, "macosx-fspanel" ) || b_nonActive )
return;
if( [self alphaValue] < 1.0 )
[self orderFront: nil];
if( [self alphaValue] < 1.0 || b_displayed != YES )
{
if (![self fadeTimer])
[self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(focus:) userInfo:[NSNumber numberWithShort:1] repeats:YES]];
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment