[vlc-devel] commit: Use --x11-display whenever calling XOpenDisplay ( except Qt4 this far) ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Feb 2 21:33:56 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Feb  2 22:32:41 2009 +0200| [1590cffcccc6df3c65b5034e08b6bee121030164] | committer: Rémi Denis-Courmont 

Use --x11-display whenever calling XOpenDisplay (except Qt4 this far)

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

 modules/access/screen/x11.c            |    4 +++-
 modules/control/globalhotkeys/x11.c    |    4 +++-
 modules/gui/skins2/x11/x11_display.cpp |    4 +++-
 modules/video_filter/panoramix.c       |    5 ++++-
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/modules/access/screen/x11.c b/modules/access/screen/x11.c
index 2cd3bed..177f382 100644
--- a/modules/access/screen/x11.c
+++ b/modules/access/screen/x11.c
@@ -41,11 +41,13 @@ int screen_InitCapture( demux_t *p_demux )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
     Display *p_display;
+    char *psz_display = var_CreateGetNonEmptyString( p_demux, "x11-display" );
     XWindowAttributes win_info;
     int i_chroma;
 
     /* Open the display */
-    p_display = XOpenDisplay( NULL );
+    p_display = XOpenDisplay( psz_display );
+    free( psz_display );
     if( !p_display )
     {
         msg_Err( p_demux, "cannot open display" );
diff --git a/modules/control/globalhotkeys/x11.c b/modules/control/globalhotkeys/x11.c
index 7ffd007..7a0099e 100644
--- a/modules/control/globalhotkeys/x11.c
+++ b/modules/control/globalhotkeys/x11.c
@@ -81,8 +81,10 @@ static int Open( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
     intf_sys_t *p_sys;
+    char *psz_display = var_CreateGetNonEmptyString( p_intf, "x11-display" );
 
-    Display *p_display = XOpenDisplay( NULL );
+    Display *p_display = XOpenDisplay( psz_display );
+    free( psz_display );
     if( !p_display )
         return VLC_EGENERIC;
     XSetErrorHandler( X11ErrorHandler );
diff --git a/modules/gui/skins2/x11/x11_display.cpp b/modules/gui/skins2/x11/x11_display.cpp
index 5cb0bf1..143c45f 100644
--- a/modules/gui/skins2/x11/x11_display.cpp
+++ b/modules/gui/skins2/x11/x11_display.cpp
@@ -53,8 +53,10 @@
 X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
     m_mainWindow( 0 ), m_gc( NULL ), m_colormap( 0 )
 {
+    char *psz_display = var_CreateGetNonEmptyString( pIntf, "x11-display" );
     // Open a connection to the X Server
-    m_pDisplay = XOpenDisplay( NULL );
+    m_pDisplay = XOpenDisplay( psz_display );
+    free( psz_display );
 
     if( m_pDisplay == NULL )
     {
diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c
index 3b7c9ab..7d20669 100644
--- a/modules/video_filter/panoramix.c
+++ b/modules/video_filter/panoramix.c
@@ -558,7 +558,10 @@ static int AdjustHeight( vout_thread_t *p_vout )
         i_window_width  = GetSystemMetrics(SM_CXSCREEN);
         i_window_height = GetSystemMetrics(SM_CYSCREEN);
 #else
-        Display *p_display = XOpenDisplay( "" );
+        char *psz_display = var_CreateGetNonEmptyString( p_vout,
+                                                        "x11-display" );
+        Display *p_display = XOpenDisplay( psz_display );
+        free( psz_display );
         if (p_vout->p_sys->b_xinerama)
         {
             i_window_width = DisplayWidth(p_display, 0) / p_vout->p_sys->i_col;




More information about the vlc-devel mailing list