Commit f1ff3934 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix the issue where sometimes the Menubar wouldn't reappear after exiting fullscreen.

parent 6b99a438
...@@ -120,7 +120,6 @@ ...@@ -120,7 +120,6 @@
vout_thread_t * p_real_vout; vout_thread_t * p_real_vout;
Ptr p_fullscreen_state; Ptr p_fullscreen_state;
vlc_bool_t b_fullscreen;
vlc_bool_t b_init_ok; vlc_bool_t b_init_ok;
} }
......
...@@ -935,7 +935,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -935,7 +935,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
b_init_ok = VLC_FALSE; b_init_ok = VLC_FALSE;
p_fullscreen_state = NULL; p_fullscreen_state = NULL;
b_fullscreen = VLC_FALSE;
p_real_vout = [VLCVoutView getRealVout: p_vout]; p_real_vout = [VLCVoutView getRealVout: p_vout];
i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" ); i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" );
...@@ -958,7 +957,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -958,7 +957,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
if( p_vout->b_fullscreen ) if( p_vout->b_fullscreen )
{ {
CGDisplayFadeReservationToken token; CGDisplayFadeReservationToken token;
b_fullscreen = VLC_TRUE;
NSRect screen_rect = [o_screen frame]; NSRect screen_rect = [o_screen frame];
screen_rect.origin.x = screen_rect.origin.y = 0; screen_rect.origin.x = screen_rect.origin.y = 0;
...@@ -1013,7 +1011,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1013,7 +1011,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
if( var_GetBool( p_vout, "macosx-black" ) ) if( var_GetBool( p_vout, "macosx-black" ) )
{ {
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token); CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false ); CGDisplayFade( token, 2 , kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
CGReleaseDisplayFadeReservation( token); CGReleaseDisplayFadeReservation( token);
} }
} }
...@@ -1097,18 +1095,15 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1097,18 +1095,15 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (id) closeReal: (id) sender - (id) closeReal: (id) sender
{ {
if( b_fullscreen == VLC_TRUE ) if( p_fullscreen_state )
EndFullScreen( p_fullscreen_state, 0 );
if( var_GetBool( p_vout, "macosx-black" ) )
{ {
if( p_vout->b_fullscreen ) CGDisplayFadeReservationToken token;
EndFullScreen( p_fullscreen_state, 0 ); CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
if( var_GetBool( p_vout, "macosx-black" ) ) CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
{ CGReleaseDisplayFadeReservation( token);
CGDisplayFadeReservationToken token; CGDisplayRestoreColorSyncSettings();
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
CGReleaseDisplayFadeReservation( token);
CGDisplayRestoreColorSyncSettings();
}
} }
[super close]; [super close];
return NULL; 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