Add hidden panes and a "show desktop" button to the pane list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael Grant
2026-10-01 08:24:16 +01:00
parent 291c043080
commit d6cf5e0e4d
14 changed files with 281 additions and 48 deletions

View File

@@ -65,13 +65,15 @@ cmd_break_pane_float(struct cmdq_item *item, struct args *args,
free(cause);
return (CMD_RETURN_ERROR);
}
layout_remove_tile(w, lc);
/* A hidden pane has already given up its space. */
if (~wp->flags & PANE_HIDDEN)
layout_remove_tile(w, lc);
layout_set_size(lc, fg->sx, fg->sy, fg->xoff, fg->yoff);
lc->flags |= LAYOUT_CELL_FLOATING;
window_raise_pane(wp);
if (!args_has(args, 'd'))
if (!args_has(args, 'd') && (~wp->flags & PANE_HIDDEN))
window_set_active_pane(w, wp, 1);
layout_fix_offsets(w);
layout_fix_panes(w, NULL);
@@ -149,6 +151,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
window_lost_pane(w, wp);
layout_close_pane(wp);
wp->flags &= ~(PANE_HIDDEN|PANE_HIDDENALL);
w = wp->window = window_create(w->sx, w->sy, w->xpixel, w->ypixel);
window_add_ref(w, __func__);
options_set_parent(wp->options, w->options);