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

XCB: simplify, fix assertion on grayscale displays

(X11 has a similar bug, not to how to fix it)
parent 1af6b527
......@@ -151,12 +151,12 @@ static int Open (vlc_object_t *obj)
scr->root_depth)) != NULL)
msg_Dbg (vout, "using TrueColor visual ID %d", (int)vt->visual_id);
else
if ((vt = xcb_aux_find_visual_by_attrs (scr,XCB_VISUAL_CLASS_STATIC_COLOR,
if ((vt = xcb_aux_find_visual_by_attrs (scr, XCB_VISUAL_CLASS_STATIC_COLOR,
scr->root_depth)) != NULL)
msg_Dbg (vout, "using static color visual ID %d", (int)vt->visual_id);
else
{
vt = xcb_aux_get_visualtype (p_sys->conn, snum, scr->root_visual);
vt = xcb_aux_find_visual_by_id (scr, scr->root_visual);
assert (vt);
msg_Err (vout, "unsupported visual class %"PRIu8, vt->_class);
goto error;
......
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