-
-#if 0
-/*
- * Moves the client 10px to the specified direction.
- *
- */
-void floating_move(xcb_connection_t *conn, Client *currently_focused, direction_t direction) {
- DLOG("floating move\n");
-
- Rect destination = currently_focused->rect;
- Rect *screen = &(currently_focused->workspace->output->rect);
-
- switch (direction) {
- case D_LEFT:
- destination.x -= 10;
- break;
- case D_RIGHT:
- destination.x += 10;
- break;
- case D_UP:
- destination.y -= 10;
- break;
- case D_DOWN:
- destination.y += 10;
- break;
- /* to make static analyzers happy */
- default:
- break;
- }
-
- /* Prevent windows from vanishing completely */
- if ((int32_t)(destination.x + destination.width - 5) <= (int32_t)screen->x ||
- (int32_t)(destination.x + 5) >= (int32_t)(screen->x + screen->width) ||
- (int32_t)(destination.y + destination.height - 5) <= (int32_t)screen->y ||
- (int32_t)(destination.y + 5) >= (int32_t)(screen->y + screen->height)) {
- DLOG("boundary check failed, not moving\n");
- return;
- }
-
- currently_focused->rect = destination;
- reposition_client(conn, currently_focused);
-
- /* Because reposition_client does not send a faked configure event (only resize does),
- * we need to initiate that on our own */
- fake_absolute_configure_notify(conn, currently_focused);
- /* fake_absolute_configure_notify flushes */
-}
-
-/*
- * Hides all floating clients (or show them if they are currently hidden) on
- * the specified workspace.
- *
- */
-void floating_toggle_hide(xcb_connection_t *conn, Workspace *workspace) {
- Client *client;
-
- workspace->floating_hidden = !workspace->floating_hidden;
- DLOG("floating_hidden is now: %d\n", workspace->floating_hidden);
- TAILQ_FOREACH(client, &(workspace->floating_clients), floating_clients) {
- if (workspace->floating_hidden)
- client_unmap(conn, client);
- else client_map(conn, client);
- }
-
- /* If we just unmapped all floating windows we should ensure that the focus
- * is set correctly, that ist, to the first non-floating client in stack */
- if (workspace->floating_hidden)
- SLIST_FOREACH(client, &(workspace->focus_stack), focus_clients) {
- if (client_is_floating(client))
- continue;
- set_focus(conn, client, true);
- return;
- }
-
- xcb_flush(conn);
-}
-#endif