+ if (f->depth != screen->root_depth)
+ continue; /* this would fail anyway */
+
+ 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 list[] = {
+ /* XCB_CW_BACK_PIXMAP */
+ pixmap,
+ /* XCB_CW_BACK_PIXEL */
+ screen->black_pixel,
+ /* XCB_CW_BORDER_PIXMAP */
+ pixmap,
+ /* XCB_CW_BORDER_PIXEL */
+ screen->black_pixel,
+ /* XCB_CW_EVENT_MASK */
+ XCB_EVENT_MASK_VISIBILITY_CHANGE,
+ /* XCB_CW_COLORMAP */
+ screen->default_colormap,
+ };
+
+ xcb_void_cookie_t c;
+
+ xcb_create_pixmap (conn, f->depth, pixmap, screen->root, 1, 1);
+ c = xcb_create_window_checked (conn, f->depth, p_sys->window,
+ p_sys->embed->handle.xid, 0, 0, 1, 1, 0,
+ XCB_WINDOW_CLASS_INPUT_OUTPUT, f->visual, mask, list);
+
+ if (!CheckError (vd, conn, "cannot create X11 window", c))
+ {
+ msg_Dbg (vd, "using X11 visual ID 0x%"PRIx32
+ " (depth: %"PRIu8")", f->visual, f->depth);
+ msg_Dbg (vd, "using X11 window 0x%08"PRIx32, p_sys->window);
+ goto created_window;
+ }