* Fix the issue where sometimes the Menubar wouldn't reappear after exiting fullscreen.
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 7 Mar 2006 23:56:32 +0000 (23:56 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 7 Mar 2006 23:56:32 +0000 (23:56 +0000)
modules/gui/macosx/vout.h
modules/gui/macosx/vout.m

index 2d5ae67..13f691a 100644 (file)
 
     vout_thread_t * p_real_vout;
     Ptr             p_fullscreen_state;
-    vlc_bool_t      b_fullscreen;
     vlc_bool_t      b_init_ok;
 }
 
index 4500f3d..a0426bc 100644 (file)
@@ -935,7 +935,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     b_init_ok = VLC_FALSE;
 
     p_fullscreen_state = NULL;
-    b_fullscreen = VLC_FALSE;
     p_real_vout = [VLCVoutView getRealVout: p_vout];
     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,
     if( p_vout->b_fullscreen )
     {
         CGDisplayFadeReservationToken token;
-        b_fullscreen = VLC_TRUE;
         NSRect screen_rect = [o_screen frame];
         screen_rect.origin.x = screen_rect.origin.y = 0;
 
@@ -1013,7 +1011,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
         if( var_GetBool( p_vout, "macosx-black" ) )
         {
             CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
-            CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
+            CGDisplayFade( token, 2 , kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
             CGReleaseDisplayFadeReservation( token);
         }
     }
@@ -1097,18 +1095,15 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
 
 - (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 )
-            EndFullScreen( p_fullscreen_state, 0 );
-        if( var_GetBool( p_vout, "macosx-black" ) )
-        {
-            CGDisplayFadeReservationToken token;
-            CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
-            CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
-            CGReleaseDisplayFadeReservation( token);
-            CGDisplayRestoreColorSyncSettings();
-        }
+        CGDisplayFadeReservationToken token;
+        CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
+        CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
+        CGReleaseDisplayFadeReservation( token);
+        CGDisplayRestoreColorSyncSettings();
     }
     [super close];
     return NULL;