- xcb_get_property_cookie_t wm_type_cookie, strut_cookie, state_cookie,
- utf8_title_cookie, title_cookie,
- class_cookie, leader_cookie;
- uint32_t mask = 0;
- uint32_t values[3];
- uint16_t original_height = height;
- bool map_frame = true;
-
- /* We are interested in property changes */
- mask = XCB_CW_EVENT_MASK;
- values[0] = CHILD_EVENT_MASK;
- xcb_change_window_attributes(conn, child, mask, values);
-
- /* Place requests for properties ASAP */
- wm_type_cookie = xcb_get_any_property_unchecked(conn, false, child, atoms[_NET_WM_WINDOW_TYPE], UINT32_MAX);
- strut_cookie = xcb_get_any_property_unchecked(conn, false, child, atoms[_NET_WM_STRUT_PARTIAL], UINT32_MAX);
- state_cookie = xcb_get_any_property_unchecked(conn, false, child, atoms[_NET_WM_STATE], UINT32_MAX);
- utf8_title_cookie = xcb_get_any_property_unchecked(conn, false, child, atoms[_NET_WM_NAME], 128);
- leader_cookie = xcb_get_any_property_unchecked(conn, false, child, atoms[WM_CLIENT_LEADER], UINT32_MAX);
- title_cookie = xcb_get_any_property_unchecked(conn, false, child, WM_NAME, 128);
- class_cookie = xcb_get_any_property_unchecked(conn, false, child, WM_CLASS, 128);
-
- Client *new = table_get(&by_child, child);
-
- /* Events for already managed windows should already be filtered in manage_window() */
- assert(new == NULL);
-
- LOG("Managing window 0x%08x\n", child);
- DLOG("x = %d, y = %d, width = %d, height = %d\n", x, y, width, height);
- new = scalloc(sizeof(Client));
- new->force_reconfigure = true;
-
- /* Update the data structures */
- Client *old_focused = CUR_CELL->currently_focused;
-
- new->container = CUR_CELL;
- new->workspace = new->container->workspace;
-
- /* Minimum useful size for managed windows is 75x50 (primarily affects floating) */