From bbe26df83dd1286df79d9b556f4235afdf360a21 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 27 May 2026 19:36:04 +0000 Subject: [PATCH] Add an accessor function needed for floating panes. --- tmux.h | 1 + window.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/tmux.h b/tmux.h index 609e8e7c..35c215a7 100644 --- a/tmux.h +++ b/tmux.h @@ -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); diff --git a/window.c b/window.c index 7fc438ea..6b834d2f 100644 --- a/window.c +++ b/window.c @@ -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) {