From 88e7248c43324b2f776cf54f4d90dc960a581756 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 11 Apr 2010 11:18:45 +0300 Subject: [PATCH] Qt4: use putenv() before any thread is created --- bin/vlc.c | 4 ++++ modules/gui/qt4/qt4.cpp | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/vlc.c b/bin/vlc.c index 1c64656a23..9ccbdd8940 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 fe7ea7d61a..b823c04991 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 -- 2.39.2