]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/video.cpp
psz_intf_switch was read-only: remove dead code
[vlc] / modules / gui / wxwidgets / video.cpp
index 6a3ab70a11516ba54f044469210ac41f0ea4f26b..2eace2d6a920f0467bc7d15fcfe9a210e9f35f21 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <vlc/vlc.h>
-#include <vlc/vout.h>
-#include <vlc/intf.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_vout.h>
+#include <vlc_interface.h>
 
 #include "video.hpp"
 #include "interface.hpp"
@@ -93,7 +97,7 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ):
     p_parent = _p_parent;
     p_child_window = 0;
 
-    vlc_mutex_init( p_intf, &lock );
+    vlc_mutex_init( &lock );
 
     b_auto_size = p_intf->p_sys->b_video_autosize;
 
@@ -134,7 +138,7 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ):
 
     if( p_child_window ) p_child_window->Show();
     Show();
-    b_shown = VLC_TRUE;
+    b_shown = true;
 
     p_intf->p_sys->p_video_sizer = new wxBoxSizer( wxHORIZONTAL );
 #if (wxCHECK_VERSION(2,5,3))
@@ -151,16 +155,8 @@ VideoWindow::~VideoWindow()
     vlc_mutex_lock( &lock );
     if( p_vout )
     {
-        if( !p_intf->psz_switch_intf )
-        {
-            if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
-                vout_Control( p_vout, VOUT_REPARENT );
-        }
-        else
-        {
-            if( vout_Control( p_vout, VOUT_REPARENT ) != VLC_SUCCESS )
-                vout_Control( p_vout, VOUT_CLOSE );
-        }
+        if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
+            vout_Control( p_vout, VOUT_REPARENT, 0 );
     }
 
     p_intf->pf_request_window = NULL;
@@ -277,7 +273,7 @@ void VideoWindow::UpdateSize( wxEvent &_event )
         p_intf->p_sys->p_video_sizer->Show( this, TRUE );
         p_intf->p_sys->p_video_sizer->Layout();
         SetFocus();
-        b_shown = VLC_TRUE;
+        b_shown = true;
     }
 
     p_intf->p_sys->p_video_sizer->SetMinSize( event->GetSize() );
@@ -299,7 +295,7 @@ void VideoWindow::OnHideTimer( wxTimerEvent& WXUNUSED(event))
         p_intf->p_sys->p_video_sizer->Show( this, FALSE );
         SetSize( 0, 0 );
         p_intf->p_sys->p_video_sizer->Layout();
-        b_shown = VLC_FALSE;
+        b_shown = false;
     }
     p_intf->p_sys->p_video_sizer->SetMinSize( wxSize(0,0) );