2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
7 * sync.c: i3 sync protocol: https://i3wm.org/docs/testsuite.html#i3_sync
12 void sync_respond(xcb_window_t window, uint32_t rnd) {
13 DLOG("[i3 sync protocol] Sending random value %d back to X11 window 0x%08x\n", rnd, window);
15 void *reply = scalloc(32, 1);
16 xcb_client_message_event_t *ev = reply;
18 ev->response_type = XCB_CLIENT_MESSAGE;
22 ev->data.data32[0] = window;
23 ev->data.data32[1] = rnd;
25 xcb_send_event(conn, false, window, XCB_EVENT_MASK_NO_EVENT, (char *)ev);