From 55fdfef9d1c7a7a8cefc9ed59f25bed3acb601b2 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 19 May 2026 13:19:21 +0100 Subject: [PATCH] Merge fixes. --- tmux.h | 3 --- window.c | 75 -------------------------------------------------------- 2 files changed, 78 deletions(-) diff --git a/tmux.h b/tmux.h index 274205b9..949d6696 100644 --- a/tmux.h +++ b/tmux.h @@ -1386,9 +1386,6 @@ struct window { u_int xpixel; u_int ypixel; - u_int last_new_pane_x; - u_int last_new_pane_y; - u_int new_sx; u_int new_sy; u_int new_xpixel; diff --git a/window.c b/window.c index 4cf2599e..225fee1f 100644 --- a/window.c +++ b/window.c @@ -2168,81 +2168,6 @@ window_pane_tiled_geometry(struct window *w, struct window_pane *wp, return (0); } -int -window_pane_float_geometry(struct window *w, struct window_pane *wp, - u_int *out_x, u_int *out_y, u_int *out_sx, u_int *out_sy, - struct cmdq_item *item, struct args *args, char **cause) -{ - u_int x, y, sx, sy; - const u_int cx = 4, cy = 2; - - if (wp != NULL && (wp->flags & PANE_SAVED_FLOAT) && - !args_has(args, 'x') && !args_has(args, 'y') && - !args_has(args, 'X') && !args_has(args, 'Y')) { - x = wp->saved_float_xoff; - y = wp->saved_float_yoff; - sx = wp->saved_float_sx; - sy = wp->saved_float_sy; - goto out; - } - - /* Default size. */ - sx = w->sx / 2; - sy = w->sy / 2; - - if (args_has(args, 'x')) { - sx = args_percentage_and_expand(args, 'x', 0, USHRT_MAX, w->sx, - item, cause); - if (*cause != NULL) - return (-1); - } - if (args_has(args, 'y')) { - sy = args_percentage_and_expand(args, 'y', 0, USHRT_MAX, w->sy, - item, cause); - if (*cause != NULL) - return (-1); - } - - /* Position defaults to cascading when not defined. */ - if (args_has(args, 'X')) { - x = args_percentage_and_expand(args, 'X', 0, USHRT_MAX, w->sx, - item, cause); - if (*cause != NULL) - return (-1); - } else { - if (w->last_new_pane_x == 0) - x = cx; - else { - x = w->last_new_pane_x + cx; - if (w->last_new_pane_x > w->sx) - x = cx; - } - w->last_new_pane_x = x; - } - if (args_has(args, 'Y')) { - y = args_percentage_and_expand(args, 'Y', 0, USHRT_MAX, w->sy, - item, cause); - if (*cause != NULL) - return (-1); - } else { - if (w->last_new_pane_y == 0) - y = cy; - else { - y = w->last_new_pane_y + cy; - if (w->last_new_pane_y > w->sy) - y = cy; - } - w->last_new_pane_y = y; - } - -out: - *out_x = x; - *out_y = y; - *out_sx = sx; - *out_sy = sy; - return (0); -} - /* Work out geometry for floating panes. */ int window_pane_floating_geometry(struct window *w, __unused struct window_pane *wp,