]> git.sesse.net Git - vlc/commitdiff
Do not pass custom Xlib display to Qt4 - fixes #2322
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 15 Apr 2009 19:55:08 +0000 (22:55 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 15 Apr 2009 19:55:08 +0000 (22:55 +0300)
modules/gui/qt4/qt4.cpp

index 389f53facf5eb9dc0588d8204d2f4b6a54e9bae6..b66626e0bd5b272adf33e25870d0d86613f37289 100644 (file)
@@ -368,10 +368,15 @@ static void *Thread( void *obj )
 
     /* Start the QApplication here */
 #ifdef Q_WS_X11
-    QVLCApp app( (Display *)p_intf->p_sys->display, argc, argv );
-#else
-    QVLCApp app( argc, argv );
+    char *display = var_CreateGetNonEmptyString( p_intf, "x11-display" );
+    if( display )
+    {
+        argv[argc++] = const_cast<char *>("-display");
+        argv[argc++] = display;
+        argv[argc] = NULL;
+    }
 #endif
+    QVLCApp app( argc, argv );
     p_intf->p_sys->p_app = &app;
 
 
@@ -505,6 +510,7 @@ static void *Thread( void *obj )
     free( psz_path );
 
     /* Delete the application automatically */
+    free( display );
     return NULL;
 }