]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/vout_manager.cpp
Qt: iconView delegate: encode PLModel::IsCurrent(QModelIndex) into cache key
[vlc] / modules / gui / skins2 / src / vout_manager.cpp
index a2a9fc802fe1e18a5c7edbb0ec948dfdc4b578f9..02ed43ca8827e4284166fce76c64193e925a7e0d 100644 (file)
@@ -56,10 +56,17 @@ void VoutManager::destroy( intf_thread_t *pIntf )
 
 
 VoutManager::VoutManager( intf_thread_t *pIntf ): SkinObject( pIntf ),
-     m_pVoutMainWindow( NULL ), m_pCtrlVideoVec(),
+     m_pVoutMainWindow( NULL ), m_pFscWindow( NULL ), m_pCtrlVideoVec(),
      m_pCtrlVideoVecBackup(), m_SavedWndVec()
 {
     m_pVoutMainWindow = new VoutMainWindow( getIntf() );
+
+    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
+    int width = pOsFactory->getScreenWidth();
+    int height = pOsFactory->getScreenHeight();
+
+    m_pVoutMainWindow->move( 0, 0 );
+    m_pVoutMainWindow->resize( width, height );
 }
 
 
@@ -75,6 +82,16 @@ void VoutManager::registerCtrlVideo( CtrlVideo* p_CtrlVideo )
 }
 
 
+void VoutManager::registerFSC( TopWindow* p_Win )
+{
+    m_pFscWindow = p_Win;
+
+    int x = p_Win->getLeft();
+    int y = p_Win->getTop();
+    p_Win->setParent( m_pVoutMainWindow, x , y, 0, 0 );
+}
+
+
 void VoutManager::saveVoutConfig( )
 {
     // Save width/height to be consistent across themes
@@ -211,7 +228,7 @@ void VoutManager::releaseWnd( vout_window_t *pWnd )
     {
         if( (*it).pWnd == pWnd )
         {
-            msg_Dbg( getIntf(), "vout released vout=0x%p, VideoCtrl=0x%p",
+            msg_Dbg( getIntf(), "vout released vout=%p, VideoCtrl=%p",
                              pWnd, (*it).pCtrlVideo );
 
             // if a video control was being used, detach from it
@@ -256,19 +273,18 @@ void VoutManager::setSizeWnd( vout_window_t *pWnd, int width, int height )
 
 void VoutManager::setFullscreenWnd( vout_window_t *pWnd, bool b_fullscreen )
 {
-   msg_Dbg( pWnd, "setFullscreen (%d) received from vout thread",
-                   b_fullscreen ? 1 : 0 );
+    msg_Dbg( pWnd, "setFullscreen (%d) received from vout thread",
+                    b_fullscreen ? 1 : 0 );
 
-   vector<SavedWnd>::iterator it;
-   for( it = m_SavedWndVec.begin(); it != m_SavedWndVec.end(); it++ )
-   {
-       if( (*it).pWnd == pWnd )
-       {
-           VoutWindow* pVoutWindow = (*it).pVoutWindow;
+    VlcProc::instance( getIntf() )->setFullscreenVar( b_fullscreen );
 
-           pVoutWindow->setFullscreen( b_fullscreen );
-           break;
-       }
+    if( b_fullscreen )
+    {
+        m_pVoutMainWindow->show();
+    }
+    else
+    {
+        m_pVoutMainWindow->hide();
     }
 }
 
@@ -342,7 +358,7 @@ int VoutManager::controlWindow( struct vout_window_t *pWnd,
                    AsyncQueue::instance( pThis->getIntf() );
                 pQueue->push( CmdGenericPtr( pCmd ) );
             }
-            return VLC_SUCCESS;
+            return VLC_EGENERIC;
         }
 
         case VOUT_WINDOW_SET_FULLSCREEN: