]> git.sesse.net Git - vlc/commitdiff
* forward-port [17497] with the addition of an 'embedded' check, because this work...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 5 Nov 2006 22:52:10 +0000 (22:52 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 5 Nov 2006 22:52:10 +0000 (22:52 +0000)
modules/gui/macosx/vout.h
modules/gui/macosx/vout.m

index c130d1a7b967ca83c22f72c4747b844de55e3410..564337789795537b2e7129f3f8f525c761b6e3f1 100644 (file)
     vout_thread_t * p_real_vout;
     vlc_bool_t      b_init_ok;
     vlc_bool_t      b_black;
+    vlc_bool_t      b_embedded;
 }
 
 - (id) initWithVout: (vout_thread_t *) p_vout view: (VLCVoutView *) view
index 510bb1b5a59a2d722a1a9dd8726c4470b259beed..12133e61c7520a6db1040e06ea5704bd43e20fb6 100644 (file)
@@ -246,12 +246,14 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
 
 - (void)closeVout
 {
+    [[[[VLCMain sharedInstance] getControls] getFSPanel] fadeOut];
+
     [o_view removeFromSuperview];
     o_view = nil;
     p_vout = NULL;
     s_frame = nil;
     o_window = nil;
-    p_real_vout = NULL;
+    p_real_vout = NULL;            
 }
 
 - (void)updateTitle
@@ -922,6 +924,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     p_real_vout = [VLCVoutView getRealVout: p_vout];
     i_device = var_GetInteger( p_real_vout->p_libvlc, "video-device" );
     b_black = var_GetBool( p_vout, "macosx-black" );
+    b_embedded = var_GetBool( p_vout, "macosx-embedded" );
 
     /* Find out on which screen to open the window */
     if( i_device <= 0 || i_device > (int)[o_screens count] )
@@ -1063,7 +1066,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     [o_view closeVout];
 }
 
-- (void) closeWindow
+- (void)closeWindow
 {
     /* XXX waitUntilDone = NO to avoid a possible deadlock when hitting
        Command-Q */
@@ -1072,7 +1075,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
         withObject: NULL waitUntilDone: NO];
 }
 
-- (id) closeReal: (id) sender
+- (id)closeReal:(id)sender
 {
     if( b_black == VLC_TRUE )
     {
@@ -1084,6 +1087,10 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     }
     SetSystemUIMode( kUIModeNormal, 0);
     [super close];
+    /* this does only work in embedded mode */
+    if( b_embedded == VLC_TRUE )
+        [[[[VLCMain sharedInstance] getControls] getFSPanel] orderOut: self];
+
     return NULL;
 }