]> git.sesse.net Git - vlc/commitdiff
* skins2: Loading a new theme while an embedded vout is used works better
authorOlivier Teulière <ipkiss@videolan.org>
Sat, 18 Dec 2004 13:19:53 +0000 (13:19 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sat, 18 Dec 2004 13:19:53 +0000 (13:19 +0000)
   (the new vout is refreshed)

modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/vlcproc.hpp

index 8385f45ed44b5d4192d7738fb3d1c413936f19d7..3835da0f78e7f63e42fb5d395bbaee43ea26396f 100755 (executable)
@@ -27,6 +27,7 @@
 #include "../parser/builder.hpp"
 #include "../parser/skin_parser.hpp"
 #include "../src/os_factory.hpp"
+#include "../src/vlcproc.hpp"
 #include "../src/window_manager.hpp"
 
 #ifdef HAVE_FCNTL_H
@@ -99,6 +100,9 @@ bool ThemeLoader::load( const string &fileName )
     }
     if( skin_last ) free( skin_last );
 
+    // The new theme cannot embed a video output yet
+    getIntf()->p_sys->p_vlcProc->setVoutUnused();
+
     return true;
 }
 
index b43cf8b51cc1234d156df7e3d41f8ec7e1f30ecc..90720c1052fd85ac16db378b2eca1700be5ee6df 100755 (executable)
@@ -68,6 +68,10 @@ class VlcProc: public SkinObject
         /// Indicate whether the embedded video output is currently used
         bool isVoutUsed() const { return m_pVout; }
 
+        /// Forget that an embedded video output is used (typically used when
+        /// changing skins, since the video output cannot change parent)
+        void setVoutUnused() { m_pVout = NULL; }
+
     protected:
         // Protected because it is a singleton
         VlcProc( intf_thread_t *pIntf );