]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/x11/x11_factory.cpp
Revert "skins2(X11): add missing <limits.h>"
[vlc] / modules / gui / skins2 / x11 / x11_factory.cpp
index a6b0df6f4bb0f289ebac06bc2fdd596c6a1601e4..9a28a7f9d3eed8bb723c15d46db34442af80abe9 100644 (file)
@@ -40,6 +40,9 @@
 
 #include "../src/generic_window.hpp"
 
+#include <vlc_common.h>
+#include <vlc_xlib.h>
+
 X11Factory::X11Factory( intf_thread_t *pIntf ): OSFactory( pIntf ),
     m_pDisplay( NULL ), m_pTimerLoop( NULL ), m_dirSep( "/" )
 {
@@ -57,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() );
@@ -80,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;
 }