-/*
- * Callback for resizing windows
- *
- */
-static void resize_callback(xcb_connection_t *conn, Client *client, border_t border, Rect *old_rect,
- xcb_button_press_event_t *event, uint32_t new_x, uint32_t new_y) {
- switch (border) {
- case BORDER_RIGHT:
- client->rect.width = old_rect->width + (new_x - event->root_x);
- break;
-
- case BORDER_BOTTOM:
- client->rect.height = old_rect->height + (new_y - event->root_y);
- break;
-
- case BORDER_TOP:
- client->rect.y = old_rect->y + (new_y - event->root_y);
- client->rect.height = old_rect->height + (event->root_y - new_y);
- break;
-
- case BORDER_LEFT:
- client->rect.x = old_rect->x + (new_x - event->root_x);
- client->rect.width = old_rect->width + (event->root_x - new_x);
- break;
- }
-
- /* Push the new position/size to X11 */
- reposition_client(conn, client);
- resize_client(conn, client);
- xcb_flush(conn);
-}