mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 22:26:18 +00:00
Merge branch 'floating_panes' into floating_panes_staging
This commit is contained in:
1
tmux.h
1
tmux.h
@@ -3421,6 +3421,7 @@ struct window *window_create(u_int, u_int, u_int, u_int);
|
|||||||
void window_pane_set_event(struct window_pane *);
|
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_get_active_at(struct window *, u_int, u_int);
|
||||||
struct window_pane *window_find_string(struct window *, const char *);
|
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_has_pane(struct window *, struct window_pane *);
|
||||||
int window_set_active_pane(struct window *, struct window_pane *,
|
int window_set_active_pane(struct window *, struct window_pane *,
|
||||||
int);
|
int);
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ window_tree_build_window(struct session *s, struct winlink *wl,
|
|||||||
struct window_tree_itemdata *item;
|
struct window_tree_itemdata *item;
|
||||||
struct mode_tree_item *mti;
|
struct mode_tree_item *mti;
|
||||||
char *name, *text;
|
char *name, *text;
|
||||||
struct window_pane *wp, *fwp, **l;
|
struct window_pane *wp, **l;
|
||||||
u_int n, i;
|
u_int n, i;
|
||||||
int expanded;
|
int expanded;
|
||||||
struct format_tree *ft;
|
struct format_tree *ft;
|
||||||
@@ -267,15 +267,9 @@ window_tree_build_window(struct session *s, struct winlink *wl,
|
|||||||
format_free(ft);
|
format_free(ft);
|
||||||
|
|
||||||
if (data->type == WINDOW_TREE_SESSION ||
|
if (data->type == WINDOW_TREE_SESSION ||
|
||||||
data->type == WINDOW_TREE_WINDOW) {
|
data->type == WINDOW_TREE_WINDOW)
|
||||||
expanded = 0;
|
expanded = 0;
|
||||||
TAILQ_FOREACH(fwp, &wl->window->panes, entry) {
|
else
|
||||||
if (fwp->flags & PANE_FLOATING) {
|
|
||||||
expanded = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
expanded = 1;
|
expanded = 1;
|
||||||
mti = mode_tree_add(data->data, parent, item, (uint64_t)wl, name, text,
|
mti = mode_tree_add(data->data, parent, item, (uint64_t)wl, name, text,
|
||||||
expanded);
|
expanded);
|
||||||
|
|||||||
12
window.c
12
window.c
@@ -461,6 +461,18 @@ window_pane_send_resize(struct window_pane *wp, u_int sx, u_int sy)
|
|||||||
fatal("ioctl failed");
|
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
|
int
|
||||||
window_has_pane(struct window *w, struct window_pane *wp)
|
window_has_pane(struct window *w, struct window_pane *wp)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user