X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fskins2%2Fx11%2Fx11_factory.cpp;h=f203de836bfed05e752bce19848ab83bdb020760;hb=28e52ddb9b8a1ae76eba086114ecf0bca90383ee;hp=c765aeffe76583aec308259f9124ab17b6fac56f;hpb=65e0358c10560e40cb8da9d50599663d5e4d88fb;p=vlc diff --git a/modules/gui/skins2/x11/x11_factory.cpp b/modules/gui/skins2/x11/x11_factory.cpp index c765aeffe7..f203de836b 100644 --- a/modules/gui/skins2/x11/x11_factory.cpp +++ b/modules/gui/skins2/x11/x11_factory.cpp @@ -38,6 +38,7 @@ #include "x11_window.hpp" #include "x11_tooltip.hpp" +#include "../src/generic_window.hpp" X11Factory::X11Factory( intf_thread_t *pIntf ): OSFactory( pIntf ), m_pDisplay( NULL ), m_pTimerLoop( NULL ), m_dirSep( "/" ) @@ -55,6 +56,10 @@ X11Factory::~X11Factory() bool X11Factory::init() { + // make sure xlib is safe-thread + if( !XInitThreads() ) + msg_Err( getIntf(), "initializing xlib for multi-threading failed" ); + // Create the X11 display m_pDisplay = new X11Display( getIntf() ); @@ -71,10 +76,13 @@ bool X11Factory::init() ConnectionNumber( pDisplay ) ); // Initialize the resource path - m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir + - m_dirSep + CONFIG_DIR + "/skins2" ); + char *datadir = config_GetUserDir( VLC_DATA_DIR ); + m_resourcePath.push_back( (string)datadir + "/skins2" ); + free( datadir ); m_resourcePath.push_back( (string)"share/skins2" ); - m_resourcePath.push_back( (string)DATA_PATH + "/skins2" ); + datadir = config_GetDataDir( getIntf() ); + m_resourcePath.push_back( (string)datadir + "/skins2" ); + free( datadir ); return true; } @@ -135,10 +143,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 ); }