[vlc-commits] Remove the deprecated call to XOpenDisplay

Ludovic Fauvet git at videolan.org
Sat Dec 22 04:31:10 CET 2012


npapi-vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Sat Dec 22 01:48:38 2012 +0100| [874f2263a356a6fb555465b5eec07d1d57e4977d] | committer: Ludovic Fauvet

Remove the deprecated call to XOpenDisplay

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

 npapi/vlcwindowless_xcb.cpp |    6 ++----
 npapi/vlcwindowless_xcb.h   |    2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/npapi/vlcwindowless_xcb.cpp b/npapi/vlcwindowless_xcb.cpp
index f454d50..44a9709 100644
--- a/npapi/vlcwindowless_xcb.cpp
+++ b/npapi/vlcwindowless_xcb.cpp
@@ -23,7 +23,7 @@
 
 #include "vlcwindowless_xcb.h"
 
-#include <X11/Xlib-xcb.h>
+#include <xcb/xcb.h>
 #include <xcb/xproto.h>
 #include <xcb/xcb_image.h>
 
@@ -33,9 +33,7 @@
 VlcWindowlessXCB::VlcWindowlessXCB(NPP instance, NPuint16_t mode) :
     VlcWindowlessBase(instance, mode), m_conn(0), m_screen(0)
 {
-    //FIXME Avoid using XOpenDisplay in an XCB context
-    Display *display = XOpenDisplay(NULL);
-    if (!(m_conn = XGetXCBConnection(display)))
+    if (!(m_conn = xcb_connect(NULL, NULL)))
     {
         fprintf(stderr, "Can't connect to XCB\n");
         return;
diff --git a/npapi/vlcwindowless_xcb.h b/npapi/vlcwindowless_xcb.h
index 94227ab..41bb005 100644
--- a/npapi/vlcwindowless_xcb.h
+++ b/npapi/vlcwindowless_xcb.h
@@ -27,7 +27,7 @@
 #define WINDOWLESS
 #include "vlcplugin_base.h"
 
-#include <X11/Xlib-xcb.h>
+#include <xcb/xcb.h>
 
 class VlcWindowlessXCB : public VlcWindowlessBase
 {



More information about the vlc-commits mailing list