+ *override = reply->override_redirect;
+ return 1;
+}
+
+static int do_xinerama_check(void)
+{
+ const xcb_query_extension_reply_t *data =
+ xcb_get_extension_data(conn, &xcb_xinerama_id);
+ if (!data || !data->present)
+ return warn("do_xinerama_check: no ext");
+
+ xcb_xinerama_is_active_cookie_t cookie =
+ xcb_xinerama_is_active(conn);
+ if (!cookie.sequence)
+ return warn("do_xinerama_check: no cookie");
+
+ xcb_xinerama_is_active_reply_t *reply =
+ xcb_xinerama_is_active_reply(conn, cookie, NULL);
+ if (!reply)
+ warn("do_xinerama_check: no reply");
+
+ printf("do_xinerama_check: %d\n", reply->state);
+ return reply && reply->state;
+}
+
+static int do_query_screens(xcb_xinerama_screen_info_t **info)
+{
+ xcb_xinerama_query_screens_cookie_t cookie =
+ xcb_xinerama_query_screens(conn);
+ if (!cookie.sequence)
+ return warn("do_query_screens: bad cookie");
+
+ xcb_xinerama_query_screens_reply_t *reply =
+ xcb_xinerama_query_screens_reply(conn, cookie, NULL);
+ if (!reply)
+ return warn("do_query_screens: no reply");
+
+ int ninfo = xcb_xinerama_query_screens_screen_info_length(reply);
+ *info = xcb_xinerama_query_screens_screen_info(reply);
+ printf("do_query_screens: %d screens\n", ninfo);
+ return ninfo;