Add an accessor function needed for floating panes.

This commit is contained in:
nicm
2026-05-27 19:36:04 +00:00
parent ee67452772
commit bbe26df83d
2 changed files with 13 additions and 0 deletions

1
tmux.h
View File

@@ -3368,6 +3368,7 @@ struct window *window_create(u_int, u_int, u_int, u_int);
void window_pane_set_event(struct window_pane *);
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
struct window_pane *window_find_string(struct window *, const char *);
int window_has_floating_panes(struct window *);
int window_has_pane(struct window *, struct window_pane *);
int window_set_active_pane(struct window *, struct window_pane *,
int);

View File

@@ -454,6 +454,18 @@ window_pane_send_resize(struct window_pane *wp, u_int sx, u_int sy)
fatal("ioctl failed");
}
int
window_has_floating_panes(struct window *w)
{
struct window_pane *wp;
TAILQ_FOREACH(wp, &w->panes, entry) {
if (wp->flags & PANE_FLOATING)
return (1);
}
return (0);
}
int
window_has_pane(struct window *w, struct window_pane *wp)
{