- if (!XGetWindowAttributes(display, win->id, &wa))
- warnx("window: 0x%lx, failed XGetWindowAttributes",
+ c = xcb_get_window_attributes(conn, win->id);
+ wa = xcb_get_window_attributes_reply(conn, c, NULL);
+ if (wa) {
+ warnx("window: 0x%x, map_state: %d, state: %u, "
+ "transient: 0x%x", win->id, wa->map_state,
+ state, win->transient);
+ free(wa);
+ } else
+ warnx("window: 0x%x, failed xcb_get_window_attributes",