]> git.sesse.net Git - vlc/blobdiff - modules/video_output/x11/xcommon.c
libvlccore: "intf-show" is now a libvlc var instead of a playlist var. This removes...
[vlc] / modules / video_output / x11 / xcommon.c
index d6d625ba8c572d55a449a3a483e8f94349718d08..4bf5a8a008e186f0bd858fbd3e07bd40e7abfdae 100644 (file)
@@ -31,7 +31,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_interface.h>
 #include <vlc_playlist.h>
 #include <vlc_vout.h>
@@ -1300,14 +1300,12 @@ static int ManageVideo( vout_thread_t *p_vout )
                         val.b_bool = true;
                         var_Set( p_vout, "mouse-clicked", val );
 
-                        p_playlist = vlc_object_find( p_vout,
-                                                      VLC_OBJECT_PLAYLIST,
-                                                      FIND_ANYWHERE );
+                        p_playlist = pl_Yield( p_vout );
                         if( p_playlist != NULL )
                         {
                             vlc_value_t val; val.b_bool = false;
                             var_Set( p_playlist, "intf-popupmenu", val );
-                            vlc_object_release( p_playlist );
+                            pl_Release( p_playlist );
                         }
                     }
                     break;
@@ -1320,17 +1318,9 @@ static int ManageVideo( vout_thread_t *p_vout )
                         val.i_int &= ~2;
                         var_Set( p_vout, "mouse-button-down", val );
 
-                        p_playlist = vlc_object_find( p_vout,
-                                                      VLC_OBJECT_PLAYLIST,
-                                                      FIND_ANYWHERE );
-                        if( p_playlist != NULL )
-                        {
-                            vlc_value_t val;
-                            var_Get( p_playlist, "intf-show", &val );
-                            val.b_bool = !val.b_bool;
-                            var_Set( p_playlist, "intf-show", val );
-                            vlc_object_release( p_playlist );
-                        }
+                        var_Get( p_vout->p_libvlc, "intf-show", &val );
+                        val.b_bool = !val.b_bool;
+                        var_Set( p_vout->p_libvlc, "intf-show", val );
                     }
                     break;
 
@@ -1350,14 +1340,12 @@ static int ManageVideo( vout_thread_t *p_vout )
                             vlc_object_release( p_intf );
                         }
 
-                        p_playlist = vlc_object_find( p_vout,
-                                                      VLC_OBJECT_PLAYLIST,
-                                                      FIND_ANYWHERE );
+                        p_playlist = pl_Yield( p_vout );
                         if( p_playlist != NULL )
                         {
                             vlc_value_t val; val.b_bool = true;
                             var_Set( p_playlist, "intf-popupmenu", val );
-                            vlc_object_release( p_playlist );
+                            pl_Release( p_playlist );
                         }
                     }
                     break;
@@ -1488,13 +1476,11 @@ static int ManageVideo( vout_thread_t *p_vout )
                      == p_vout->p_sys->p_win->wm_delete_window ) )
         {
             /* the user wants to close the window */
-            playlist_t * p_playlist =
-                (playlist_t *)vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
-                                               FIND_ANYWHERE );
+            playlist_t * p_playlist = pl_Yield( p_vout );
             if( p_playlist != NULL )
             {
                 playlist_Stop( p_playlist );
-                vlc_object_release( p_playlist );
+                pl_Release( p_playlist );
             }
         }
     }