/*****************************************************************************
* vout.m: MacOS X video output module
*****************************************************************************
- * Copyright (C) 2001-2005 the VideoLAN team
+ * Copyright (C) 2001-2006 the VideoLAN team
* $Id$
*
* Authors: Colin Delacroix <colin@zoy.org>
{
vlc_value_t val;
+ if( !p_real_vout ) return;
if( var_Get( p_real_vout, "video-on-top", &val )>=0 && val.b_bool)
{
val.b_bool = VLC_FALSE;
- (void)toggleFullscreen
{
vlc_value_t val;
+ if( !p_real_vout ) return;
var_Get( p_real_vout, "fullscreen", &val );
val.b_bool = !val.b_bool;
var_Set( p_real_vout, "fullscreen", val );
/* Escape should always get you out of fullscreen */
if( key == (unichar) 0x1b )
{
- if( [self isFullscreen] )
+ if( p_real_vout && [self isFullscreen] )
{
[self toggleFullscreen];
}
{
case NSLeftMouseDown:
{
- var_Get( p_vout, "mouse-button-down", &val );
- val.i_int |= 1;
- var_Set( p_vout, "mouse-button-down", val );
+ if( [o_event clickCount] <= 1 )
+ {
+ /* single clicking */
+ var_Get( p_vout, "mouse-button-down", &val );
+ val.i_int |= 1;
+ var_Set( p_vout, "mouse-button-down", val );
+ }
+ else
+ {
+ /* multiple clicking */
+ [self toggleFullscreen];
+ }
}
break;
frame: s_arg_frame];
[self updateTitle];
[view setFrame: [self frame]];
+
+ if( var_GetBool( p_real_vout, "video-on-top" ) )
+ {
+ [o_window setLevel: NSStatusWindowLevel];
+ }
+
+
[o_window setAcceptsMouseMovedEvents: TRUE];
return b_return;
}
o_window = [self window];
[o_window makeKeyAndOrderFront: self];
[o_window setAcceptsMouseMovedEvents: TRUE];
+
+ if( var_GetBool( p_real_vout, "video-on-top" ) )
+ {
+ [o_window setLevel: NSStatusWindowLevel];
+ }
+
[view setFrameSize: [self frame].size];
}
return b_return;
b_init_ok = VLC_FALSE;
- p_fullscreen_state = NULL;
p_real_vout = [VLCVoutView getRealVout: p_vout];
i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" );
b_black = var_GetBool( p_real_vout->p_vlc, "macosx-black" );
}
if( b_menubar_screen )
{
- BeginFullScreen( &p_fullscreen_state, NULL, 0, 0,
- NULL, NULL, fullScreenAllowEvents );
+ SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
}
if( b_black == VLC_TRUE )
{
[self setAlphaValue: var_GetFloat( p_vout, "macosx-opaqueness" )];
- if( var_GetBool( p_real_vout, "video-on-top" ) )
- {
- [self setLevel: NSStatusWindowLevel];
- }
-
if( !s_frame )
{
[self center];
- (id) closeReal: (id) sender
{
- if( p_fullscreen_state )
- EndFullScreen( p_fullscreen_state, 0 );
if( b_black == VLC_TRUE )
{
CGDisplayFadeReservationToken token;
CGReleaseDisplayFadeReservation( token);
CGDisplayRestoreColorSyncSettings();
}
+ SetSystemUIMode( kUIModeNormal, 0);
[super close];
return NULL;
}