[vlc-devel] commit: Do not pass custom Xlib display to Qt4 - fixes #2322 ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Apr 15 22:27:42 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 15 22:55:08 2009 +0300| [f222f159c3fb5f256fb878aa900236945c41391c] | committer: Rémi Denis-Courmont 

Do not pass custom Xlib display to Qt4 - fixes #2322

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

 modules/gui/qt4/qt4.cpp |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 389f53f..b66626e 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -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;
 }
 




More information about the vlc-devel mailing list