Commit 185c8814 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB: no need to create a color map for default visual

parent b07a9bd2
...@@ -259,9 +259,14 @@ static int Open (vlc_object_t *obj) ...@@ -259,9 +259,14 @@ static int Open (vlc_object_t *obj)
p_sys->bpp, p_sys->pad); p_sys->bpp, p_sys->pad);
/* Create colormap (needed to select non-default visual) */ /* Create colormap (needed to select non-default visual) */
if (p_sys->vid != scr->root_visual)
{
p_sys->cmap = xcb_generate_id (p_sys->conn); p_sys->cmap = xcb_generate_id (p_sys->conn);
xcb_create_colormap (p_sys->conn, XCB_COLORMAP_ALLOC_NONE, xcb_create_colormap (p_sys->conn, XCB_COLORMAP_ALLOC_NONE,
p_sys->cmap, scr->root, p_sys->vid); p_sys->cmap, scr->root, p_sys->vid);
}
else
p_sys->cmap = scr->default_colormap;
/* Check shared memory support */ /* Check shared memory support */
p_sys->shm = var_CreateGetBool (vout, "x11-shm") > 0; p_sys->shm = var_CreateGetBool (vout, "x11-shm") > 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment