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 @@ ...@@ -157,12 +157,21 @@
{ {
b_nonActive = YES; b_nonActive = YES;
[self orderOut: self]; [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 - (void)setActive:(id)noData
{ {
b_nonActive = NO; if( [[[[VLCMain sharedInstance] getControls] getVoutView] isFullscreen] )
[self orderFront: self]; {
b_nonActive = NO;
[self fadeIn];
}
} }
/* This routine is called repeatedly to fade in the window */ /* This routine is called repeatedly to fade in the window */
...@@ -235,7 +244,9 @@ ...@@ -235,7 +244,9 @@
if(! config_GetInt( VLCIntf, "macosx-fspanel" ) || b_nonActive ) if(! config_GetInt( VLCIntf, "macosx-fspanel" ) || b_nonActive )
return; return;
if( [self alphaValue] < 1.0 ) [self orderFront: nil];
if( [self alphaValue] < 1.0 || b_displayed != YES )
{ {
if (![self fadeTimer]) if (![self fadeTimer])
[self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(focus:) userInfo:[NSNumber numberWithShort:1] repeats:YES]]; [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, ...@@ -385,9 +385,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
val.b_bool = !val.b_bool; val.b_bool = !val.b_bool;
var_Set( p_real_vout, "fullscreen", val ); var_Set( p_real_vout, "fullscreen", val );
if( [self isFullscreen] ) if( [self isFullscreen] )
[[[[VLCMain sharedInstance] getControls] getFSPanel] orderFront: self]; [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
else else
[[[[VLCMain sharedInstance] getControls] getFSPanel] orderOut: self]; [[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
} }
- (BOOL)isFullscreen - (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