Bring over some of layout and positioning code for floating panes, by

Michael Grant.
This commit is contained in:
nicm
2026-05-17 16:01:42 +00:00
parent f12d7b4e67
commit a8520ba59e
12 changed files with 282 additions and 133 deletions

View File

@@ -387,7 +387,7 @@ window_tree_build(void *modedata, struct sort_criteria *sort_crit,
*tag = (uint64_t)data->fs.wl;
break;
case WINDOW_TREE_PANE:
if (window_count_panes(data->fs.wl->window) == 1)
if (window_count_panes(data->fs.wl->window, 1) == 1)
*tag = (uint64_t)data->fs.wl;
else
*tag = (uint64_t)data->fs.wp;
@@ -578,7 +578,7 @@ window_tree_draw_window(struct window_tree_modedata *data, struct session *s,
struct format_tree *ft;
struct options *oo;
total = window_count_panes(w);
total = window_count_panes(w, 1);
if (sx / total < 24) {
visible = sx / 24;