[vlc-commits] commit: Qt4: use putenv() before any thread is created ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sun Apr 11 10:22:01 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 11 11:18:45 2010 +0300| [88e7248c43324b2f776cf54f4d90dc960a581756] | committer: Rémi Denis-Courmont 

Qt4: use putenv() before any thread is created

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88e7248c43324b2f776cf54f4d90dc960a581756
---

 bin/vlc.c               |    4 ++++
 modules/gui/qt4/qt4.cpp |    1 -
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/bin/vlc.c b/bin/vlc.c
index 1c64656..9ccbdd8 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -89,6 +89,10 @@ int main( int i_argc, const char *ppsz_argv[] )
 #   endif
 #endif
 
+    /* Make Xlib hide visuals with an alphachannel. Ensure that Qt4 will not
+     * use the alpha channel for the embedded video window. */
+    putenv( (char *)"XLIB_SKIP_ARGB_VISUALS=1" );
+
     /* Synchronously intercepted POSIX signals.
      *
      * In a threaded program such as VLC, the only sane way to handle signals
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index fe7ea7d..b823c04 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -295,7 +295,6 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
         return VLC_EGENERIC;
     }
     XCloseDisplay( p_display );
-    putenv( (char *)"XLIB_SKIP_ARGB_VISUALS=1" );
 #else
     char *display = NULL;
 #endif



More information about the vlc-commits mailing list