- XGetWindowProperty(display, id, ws_idx_atom, 0, SWM_PROPLEN,
- False, XA_STRING, &type, &format, &nitems, &bytes, &prop);
+ gpr = xcb_get_property_reply(conn,
+ xcb_get_property(conn, False, id, ws_idx_atom,
+ XCB_ATOM_STRING, 0, SWM_PROPLEN),
+ NULL);
+ if (gpr) {
+ prop = malloc(xcb_get_property_value_length(gpr) + 1);
+ if (prop) {
+ memcpy(prop, xcb_get_property_value(gpr),
+ xcb_get_property_value_length(gpr));
+ prop[xcb_get_property_value_length(gpr)] = '\0';
+ }
+ free(gpr);
+ }
+