]> git.sesse.net Git - vlc/blobdiff - modules/misc/gtk_main.c
Don't include config.h from the headers - refs #297.
[vlc] / modules / misc / gtk_main.c
index 02739ba6a42c8bca1d75fd276c7986dbe530a1f4..127e59e455a94b8f34051beb9c8dab4ccc477017 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 
@@ -84,9 +88,7 @@ static int Open( vlc_object_t *p_this )
 {
     vlc_mutex_t *lock;
 
-    /* FIXME: put this in the module (de)initialization ASAP */
-    lock = var_GetGlobalCreate( "gtk" );
-    vlc_mutex_lock( lock );
+    lock = var_AcquireMutex( "gtk" );
 
     if( i_refcount > 0 )
     {
@@ -128,8 +130,7 @@ static void Close( vlc_object_t *p_this )
 {
     vlc_mutex_t *lock;
 
-    lock = var_GetGlobalMutex( "gtk" );
-    vlc_mutex_lock( lock );
+    lock = var_AcquireMutex( "gtk" );
 
     i_refcount--;
 
@@ -196,4 +197,3 @@ static void GtkMain( vlc_object_t *p_this )
 
     gdk_threads_leave();
 }
-