- /* Get the real coordinates for the WM window upper left corner */
- XGetGeometry (FRAME_X_DISPLAY (f), win,
- &rootw, &real_x, &real_y, &ow, &oh, &bw, &ign);
+#ifdef USE_XCB
+ /* Fire off the requests that don't have data dependencies.
+
+ Once we've done this, we must collect the results for each
+ one before returning, even if other errors are detected,
+ making the other responses moot. */
+ geom_cookie = xcb_get_geometry (xcb_conn, win);
+
+ trans_cookie =
+ xcb_translate_coordinates (xcb_conn,
+ /* From-window, to-window. */
+ FRAME_DISPLAY_INFO (f)->root_window,
+ FRAME_X_WINDOW (f),
+
+ /* From-position. */
+ 0, 0);
+ if (FRAME_X_WINDOW (f) != FRAME_OUTER_WINDOW (f))
+ outer_trans_cookie =
+ xcb_translate_coordinates (xcb_conn,
+ /* From-window, to-window. */
+ FRAME_DISPLAY_INFO (f)->root_window,
+ FRAME_OUTER_WINDOW (f),
+
+ /* From-position. */
+ 0, 0);
+ if (right_offset_x || bottom_offset_y)
+ outer_geom_cookie = xcb_get_geometry (xcb_conn,
+ FRAME_OUTER_WINDOW (f));
+
+ if (dpyinfo->root_window == f->output_data.x->parent_desc)
+ /* Try _NET_FRAME_EXTENTS if our parent is the root window. */
+ prop_cookie = xcb_get_property (xcb_conn, 0, win,
+ dpyinfo->Xatom_net_frame_extents,
+ target_type, 0, max_len);
+
+ sent_requests = true;
+#endif