- //i3Font *font = load_font(conn, config.font);
-
- /* see if the client is already floating */
- if (con_is_floating(con)) {
- LOG("already floating, re-setting to tiling\n");
-
- floating_disable(con, automatic);
- return;
- }
-
- floating_enable(con, automatic);
-
-
-#if 0
- if (client->dock) {
- DLOG("Not putting dock client into floating mode\n");
- return;
- }
-
- if (con == NULL) {
- DLOG("This client is already in floating (container == NULL), re-inserting\n");
- Client *next_tiling;
- Workspace *ws = client->workspace;
- SLIST_FOREACH(next_tiling, &(ws->focus_stack), focus_clients)
- if (!client_is_floating(next_tiling))
- break;
- /* If there are no tiling clients on this workspace, there can only be one
- * container: the first one */
- if (next_tiling == TAILQ_END(&(ws->focus_stack)))
- con = ws->table[0][0];
- else con = next_tiling->container;
-
- /* Remove the client from the list of floating clients */
- TAILQ_REMOVE(&(ws->floating_clients), client, floating_clients);
-
- DLOG("destination container = %p\n", con);
- Client *old_focused = con->currently_focused;
- /* Preserve position/size */
- memcpy(&(client->floating_rect), &(client->rect), sizeof(Rect));
-
- client->floating = FLOATING_USER_OFF;
- client->container = con;
-
- if (old_focused != NULL && !old_focused->dock)
- CIRCLEQ_INSERT_AFTER(&(con->clients), old_focused, client, clients);
- else CIRCLEQ_INSERT_TAIL(&(con->clients), client, clients);
-
- DLOG("Re-inserted the window.\n");
- con->currently_focused = client;
-
- client_set_below_floating(conn, client);
-
- render_container(conn, con);
- xcb_flush(conn);
-
- return;
- }
-
- DLOG("Entering floating for client %08x\n", client->child);
-
- /* Remove the client of its container */
- client_remove_from_container(conn, client, con, false);
- client->container = NULL;
-
- /* Add the client to the list of floating clients for its workspace */
- TAILQ_INSERT_TAIL(&(client->workspace->floating_clients), client, floating_clients);