* implemented showintf-support. Thanks to ipkiss for pointing out that this was missi...
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 13 Apr 2006 18:51:16 +0000 (18:51 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 13 Apr 2006 18:51:16 +0000 (18:51 +0000)
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index 49019c0..8271fac 100644 (file)
@@ -71,6 +71,7 @@ struct intf_sys_t
     vlc_bool_t b_current_title_update;
     vlc_bool_t b_fullscreen_update;
     vlc_bool_t b_volume_update;
+    vlc_bool_t b_intf_show;
 
     /* menus handlers */
     vlc_bool_t b_input_update;
index 1b3b561..dc71407 100644 (file)
@@ -184,9 +184,22 @@ static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
                      vlc_value_t old_val, vlc_value_t new_val, void *param )
 {
     intf_thread_t * p_intf = VLCIntf;
-    p_intf->p_sys->b_playlist_update = TRUE;
-    p_intf->p_sys->b_intf_update = TRUE;
-    p_intf->p_sys->b_playmode_update = TRUE;
+    p_intf->p_sys->b_playlist_update = VLC_TRUE;
+    p_intf->p_sys->b_intf_update = VLC_TRUE;
+    p_intf->p_sys->b_playmode_update = VLC_TRUE;
+    return VLC_SUCCESS;
+}
+
+/*****************************************************************************
+ * ShowController: Callback triggered by the show-intf playlist variable
+ * through the ShowIntf-control-intf, to let us show the controller-win;
+ * usually when in fullscreen-mode
+ *****************************************************************************/
+static int ShowController( vlc_object_t *p_this, const char *psz_variable,
+                     vlc_value_t old_val, vlc_value_t new_val, void *param )
+{
+    intf_thread_t * p_intf = VLCIntf;
+    p_intf->p_sys->b_intf_show = VLC_TRUE;
     return VLC_SUCCESS;
 }
 
@@ -198,7 +211,7 @@ static int FullscreenChanged( vlc_object_t *p_this, const char *psz_variable,
                      vlc_value_t old_val, vlc_value_t new_val, void *param )
 {
     intf_thread_t * p_intf = VLCIntf;
-    p_intf->p_sys->b_fullscreen_update = TRUE;
+    p_intf->p_sys->b_fullscreen_update = VLC_TRUE;
     return VLC_SUCCESS;
 }
 
@@ -449,6 +462,7 @@ static VLCMain *_o_sharedMainInstance = nil;
         val.b_bool = VLC_FALSE;
 
         var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self);
+        var_AddCallback( p_playlist, "intf-show", ShowController, self);
 
         [o_embedded_window setFullscreen: var_GetBool( p_playlist,
                                                             "fullscreen" )];
@@ -1001,6 +1015,13 @@ static VLCMain *_o_sharedMainInstance = nil;
         p_intf->p_sys->b_fullscreen_update = VLC_FALSE;
     }
 
+    if( p_intf->p_sys->b_intf_show )
+    {
+        [o_window makeKeyAndOrderFront: self];
+
+        p_intf->p_sys->b_intf_show = VLC_FALSE;
+    }
+
     if( p_input && !p_input->b_die )
     {
         vlc_value_t val;