X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fskins2%2Fx11%2Fx11_factory.cpp;h=9a28a7f9d3eed8bb723c15d46db34442af80abe9;hb=f40bd5fd59898e6c2ace87ab1e3432a552198740;hp=95a30852585a7fbdf16842f2b9e7eba177dcec9f;hpb=08d4e8d56ab54c37d32b0a5539f4a4a070e366bc;p=vlc diff --git a/modules/gui/skins2/x11/x11_factory.cpp b/modules/gui/skins2/x11/x11_factory.cpp index 95a3085258..9a28a7f9d3 100644 --- a/modules/gui/skins2/x11/x11_factory.cpp +++ b/modules/gui/skins2/x11/x11_factory.cpp @@ -38,6 +38,10 @@ #include "x11_window.hpp" #include "x11_tooltip.hpp" +#include "../src/generic_window.hpp" + +#include +#include X11Factory::X11Factory( intf_thread_t *pIntf ): OSFactory( pIntf ), m_pDisplay( NULL ), m_pTimerLoop( NULL ), m_dirSep( "/" ) @@ -56,8 +60,11 @@ X11Factory::~X11Factory() bool X11Factory::init() { // make sure xlib is safe-thread - if( !XInitThreads() ) + if( !vlc_xlib_init( VLC_OBJECT( getIntf() ) ) ) + { msg_Err( getIntf(), "initializing xlib for multi-threading failed" ); + return false; + } // Create the X11 display m_pDisplay = new X11Display( getIntf() ); @@ -79,7 +86,9 @@ bool X11Factory::init() m_resourcePath.push_back( (string)datadir + "/skins2" ); free( datadir ); m_resourcePath.push_back( (string)"share/skins2" ); - m_resourcePath.push_back( (string)config_GetDataDir () + "/skins2" ); + datadir = config_GetDataDir( getIntf() ); + m_resourcePath.push_back( (string)datadir + "/skins2" ); + free( datadir ); return true; } @@ -140,10 +149,11 @@ OSTimer *X11Factory::createOSTimer( CmdGeneric &rCmd ) OSWindow *X11Factory::createOSWindow( GenericWindow &rWindow, bool dragDrop, - bool playOnDrop, OSWindow *pParent ) + bool playOnDrop, OSWindow *pParent, + GenericWindow::WindowType_t type ) { return new X11Window( getIntf(), rWindow, *m_pDisplay, dragDrop, - playOnDrop, (X11Window*)pParent ); + playOnDrop, (X11Window*)pParent, type ); }