rendered paste body//xlib
Atom atom_root_pixmap_id = XInternAtom(dpy, "_XROOTPMAP_ID", False);
result = XGetWindowProperty (dpy, RootWindow(dpy, DefaultScreen(dpy)),
atom_root_pixmap_id,
0, 16L,
False, XA_PIXMAP,
&type, &format, &n_items,
&bytes_after, (unsigned char **)&data);
root_pxm = *data;
//xcb
xcb_intern_atom_cookie_t cookie_atom = xcb_intern_atom(conn, 0, 13, "_XROOTPMAP_ID");
xcb_intern_atom_reply_t* r_atom = xcb_intern_atom_reply (conn, cookie_atom, null);
if (!r_atom) writefln("Failure on atoms");
xcb_get_property_cookie_t cookie_prop = xcb_get_property(conn, 0, root.id, r_atom.atom, PIXMAP, 0, 16L);
xcb_get_property_reply_t* r_prop = xcb_get_property_reply(conn, cookie_prop, null);
if (!r_prop) {
free (r_atom);
writefln("Failure2 on atoms");
}
xcb_pixmap_t pid =*cast(xcb_pixmap_t *)xcb_get_property_value(r_prop);
free (r_atom);
free (r_prop);
rootPixmap = new Image(pid);