[vlc-commits] commit: XCB/X11: support different color depth than parent window ( refs #3581) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Tue Jun 1 22:57:12 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun  1 23:55:00 2010 +0300| [53752a74e22c0a64d5af333d6a9d8475d2f541f1] | committer: Rémi Denis-Courmont 

XCB/X11: support different color depth than parent window (refs #3581)

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

 modules/video_output/xcb/x11.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index dd28ca4..1f52ce7 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -249,9 +249,24 @@ static int Open (vlc_object_t *obj)
 
     p_sys->window = xcb_generate_id (p_sys->conn);
     p_sys->gc = xcb_generate_id (p_sys->conn);
+    xcb_pixmap_t pixmap = xcb_generate_id (p_sys->conn);
     {
-        const uint32_t mask = XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
+        const uint32_t mask =
+            XCB_CW_BACK_PIXMAP |
+            XCB_CW_BACK_PIXEL |
+            XCB_CW_BORDER_PIXMAP |
+            XCB_CW_BORDER_PIXEL |
+            XCB_CW_EVENT_MASK |
+            XCB_CW_COLORMAP;
         const uint32_t values[] = {
+            /* XCB_CW_BACK_PIXMAP */
+            pixmap,
+            /* XCB_CW_BACK_PIXEL */
+            scr->black_pixel,
+            /* XCB_CW_BORDER_PIXMAP */
+            pixmap,
+            /* XCB_CW_BORDER_PIXEL */
+            scr->black_pixel,
             /* XCB_CW_EVENT_MASK */
             XCB_EVENT_MASK_VISIBILITY_CHANGE,
             /* XCB_CW_COLORMAP */
@@ -259,6 +274,7 @@ static int Open (vlc_object_t *obj)
         };
         xcb_void_cookie_t c;
 
+        xcb_create_pixmap (p_sys->conn, p_sys->depth, pixmap, scr->root, 1, 1);
         c = xcb_create_window_checked (p_sys->conn, p_sys->depth,
                                        p_sys->window,
                                        p_sys->embed->handle.xid, 0, 0,



More information about the vlc-commits mailing list