+static void set_focus(xcb_connection_t *conn, Client *client) {
+ /* Update container */
+ Client *old_client = client->container->currently_focused;
+ client->container->currently_focused = client;
+
+ current_col = client->container->col;
+ current_row = client->container->row;
+
+ /* Set focus to the entered window, and flush xcb buffer immediately */
+ xcb_set_input_focus(conn, XCB_INPUT_FOCUS_NONE, client->child, XCB_CURRENT_TIME);
+ /* Update last/current client’s titlebar */
+ if (old_client != NULL)
+ decorate_window(conn, old_client);
+ decorate_window(conn, client);
+ xcb_flush(conn);
+}
+