+ root = screens[i].root;
+
+ /* Set up _NET_SUPPORTING_WM_CHECK. */
+ win = xcb_generate_id(conn);
+ xcb_create_window(conn, XCB_COPY_FROM_PARENT, win, root,
+ 0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT,
+ XCB_COPY_FROM_PARENT, 0, NULL);
+
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root,
+ a_net_wm_check, XCB_ATOM_WINDOW, 32, 1, &win);
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
+ a_net_wm_check, XCB_ATOM_WINDOW, 32, 1, &win);
+
+ /*
+ * Impersonate LG3D non-reparenting WM, written by Sun, to
+ * workaround a Java GUI rendering issue.
+ */
+ if (java_workaround)
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
+ ewmh[_NET_WM_NAME].atom, a_utf8_string,
+ 8, strlen("LG3D"), "LG3D");
+ else
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win,
+ ewmh[_NET_WM_NAME].atom, a_utf8_string,
+ 8, strlen("spectrwm"), "spectrwm");