- (void)manage
{
+ /* Dooh, why do we spend processor time doing this kind of stuff? */
[super manage];
unsigned int i_mouse_hide_timeout =
- var_GetInteger(p_vout, "mouse-hide-timeout") * 1000;
+ var_CreateGetInteger(p_vout, "mouse-hide-timeout") * 1000;
+
+ if( i_mouse_hide_timeout < 100000 )
+ i_mouse_hide_timeout = 100000;
if( p_vout->b_fullscreen )
{
if( mdate() - i_time_mouse_last_moved > i_mouse_hide_timeout )
{
+ i_time_mouse_last_moved = mdate();
[self hideMouse: YES];
}
}
- (void)enterFullscreen
{
- [super enterFullscreen];
[o_window performSelectorOnMainThread: @selector(enterFullscreen) withObject: NULL waitUntilDone: NO];
+ [super enterFullscreen];
}
- (void)leaveFullscreen
{
- [super leaveFullscreen];
[o_window performSelectorOnMainThread: @selector(leaveFullscreen) withObject: NULL waitUntilDone: NO];
+ [super leaveFullscreen];
}
[o_window setAcceptsMouseMovedEvents: TRUE];
- if( var_GetBool( p_real_vout, "video-on-top" ) )
+ if( var_CreateGetBool( p_real_vout, "video-on-top" ) )
{
[o_window setLevel: NSStatusWindowLevel];
}
[self center];
[self makeKeyAndOrderFront: self];
[self setReleasedWhenClosed: YES];
+ [self setFrameUsingName:@"VLCVoutWindowDetached"];
+ [self setFrameAutosaveName:@"VLCVoutWindowDetached"];
/* We'll catch mouse events */
[self makeFirstResponder: o_view];
[self setCanBecomeKeyWindow: YES];
+ [self setAcceptsMouseMovedEvents: YES];
+ [self setIgnoresMouseEvents: NO];
if( var_CreateGetBool( p_vout, "macosx-background" ) )
{
screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)i_device];
if( !screen ) screen = [self screen];
- if( b_black && [[NSScreen screens] count] > 1)
- {
- CGDisplayFadeReservationToken token;
- CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
- CGDisplayFade( token, 0.2 , kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
-
+ if( b_black )
[screen blackoutOtherScreens];
- CGDisplayFade( token, 0.1 , kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, NO );
- CGReleaseDisplayFadeReservation( token);
- }
-
[self setMovableByWindowBackground: NO];
- /* tell the fspanel to move itself to front next time it's triggered */
- [[[[VLCMain sharedInstance] getControls] getFSPanel] setVoutWasUpdated: i_device];
- [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
-
if( [screen isMainScreen] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
initialFrame = [self frame];
[self setFrame:[screen frame] display:YES animate:YES];
+ [self setLevel:NSNormalWindowLevel];
+
+ /* tell the fspanel to move itself to front next time it's triggered */
+ [[[[VLCMain sharedInstance] getControls] getFSPanel] setVoutWasUpdated: i_device];
+ [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
+
fullscreen = YES;
}
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
[self setFrame:initialFrame display:YES animate:YES];
[self setMovableByWindowBackground: YES];
+ if( var_GetBool( p_vout, "video-on-top" ) )
+ [self setLevel: NSStatusWindowLevel];
}
- (id)getVoutView // FIXME Naming scheme!