Commit b0133e48 authored by Damien Fouilleul's avatar Damien Fouilleul

vout.m: change in fullscreen behaviour

- toggle fullscreen mode when double clicking on video.
- allow menu autoshow/autohide when moving cursor in or out the menu area while in fullscreen mode
parent 956087a8
......@@ -119,7 +119,6 @@
NSRect * s_frame;
vout_thread_t * p_real_vout;
Ptr p_fullscreen_state;
vlc_bool_t b_init_ok;
vlc_bool_t b_black;
}
......
......@@ -460,9 +460,18 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
{
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;
......@@ -949,7 +958,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
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" );
......@@ -1022,8 +1030,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
}
if( b_menubar_screen )
{
BeginFullScreen( &p_fullscreen_state, NULL, 0, 0,
NULL, NULL, fullScreenAllowEvents );
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
}
if( b_black == VLC_TRUE )
{
......@@ -1107,8 +1114,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (id) closeReal: (id) sender
{
if( p_fullscreen_state )
EndFullScreen( p_fullscreen_state, 0 );
if( b_black == VLC_TRUE )
{
CGDisplayFadeReservationToken token;
......@@ -1117,6 +1122,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
CGReleaseDisplayFadeReservation( token);
CGDisplayRestoreColorSyncSettings();
}
SetSystemUIMode( kUIModeNormal, 0);
[super close];
return NULL;
}
......
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