Commit 4203f6a1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* backported some fspanel improvements by Pierre (earlier this year)

fspanel.m:
    - faster hiding of the curser when the panel vanishes [19133]
    - smoother fading [20660]

vout.m:
    - avoid white flashs (10.4+ only)

Note that "hey, it doesn't appear with Float-on-top" isn't fixed yet.
parent 176d399b
......@@ -51,8 +51,8 @@
[win setLevel:NSFloatingWindowLevel];
[win setAlphaValue:0.0];
i_device = 0;
[win center];
return win;
}
......@@ -115,7 +115,7 @@
else
/* user-defined screen */
theScreensFrame = [[[NSScreen screens] objectAtIndex: i_device] frame];
theWindowsFrame = [self frame];
theCoordinate.x = (theScreensFrame.size.width - theWindowsFrame.size.width) / 2 + theScreensFrame.origin.x;
......@@ -194,7 +194,7 @@
if( b_fadeQueued )
{
b_fadeQueued=NO;
[self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unfocus:) userInfo:NULL repeats:YES]];
[self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(unfocus:) userInfo:NULL repeats:YES]];
}
}
}
......@@ -211,8 +211,8 @@
return;
}
if( [self alphaValue] > 0.0 )
[self setAlphaValue:[self alphaValue]-0.1];
if( [self alphaValue] <= 0.1 )
[self setAlphaValue:[self alphaValue]-0.05];
if( [self alphaValue] <= 0.05 )
{
b_displayed = NO;
[self setAlphaValue:0.0];
......@@ -248,7 +248,7 @@
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]];
[self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(focus:) userInfo:[NSNumber numberWithShort:1] repeats:YES]];
else if ([[[self fadeTimer] userInfo] shortValue]==0)
b_fadeQueued=YES;
}
......@@ -302,6 +302,7 @@
i_timeToKeepVisibleInSec -= 1;
if( i_timeToKeepVisibleInSec < 1 )
{
[NSCursor setHiddenUntilMouseMoves: YES];
[self fadeOut];
[timer invalidate];
[timer release];
......
......@@ -373,6 +373,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
var_Get( p_real_vout, "fullscreen", &val );
val.b_bool = !val.b_bool;
var_Set( p_real_vout, "fullscreen", val );
if( [self isFullscreen] )
[[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
else
......@@ -748,6 +749,11 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)closeVout
{
[[[[VLCMain sharedInstance] getControls] getFSPanel] fadeOut];
if( MACOS_VERSION > 10.3f )
[[self window] disableScreenUpdatesUntilFlush];
[o_window closeWindow];
[o_window setAcceptsMouseMovedEvents: NO];
i_time_mouse_last_moved = 0;
......
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