+ } else if (event->type == A__NET_REQUEST_FRAME_EXTENTS) {
+ /*
+ * A client can request an estimate for the frame size which the window
+ * manager will put around it before actually mapping its window. Java
+ * does this (as of openjdk-7).
+ *
+ * Note that the calculation below is not entirely accurate — once you
+ * set a different border type, it’s off. We _could_ request all the
+ * window properties (which have to be set up at this point according
+ * to EWMH), but that seems rather elaborate. The standard explicitly
+ * says the application must cope with an estimate that is not entirely
+ * accurate.
+ */
+ DLOG("_NET_REQUEST_FRAME_EXTENTS for window 0x%08x\n", event->window);
+
+ /* The reply data: approximate frame size */
+ Rect r = {
+ config.default_border_width, /* left */
+ config.default_border_width, /* right */
+ config.font.height + 5, /* top */
+ config.default_border_width /* bottom */
+ };
+ xcb_change_property(
+ conn,
+ XCB_PROP_MODE_REPLACE,
+ event->window,
+ A__NET_FRAME_EXTENTS,
+ XCB_ATOM_CARDINAL, 32, 4,
+ &r);
+ xcb_flush(conn);