diff --git a/cmd-display-panes.c b/cmd-display-panes.c index 054c3c35..53e7989b 100644 --- a/cmd-display-panes.c +++ b/cmd-display-panes.c @@ -264,7 +264,7 @@ cmd_display_panes_draw(struct client *c, __unused void *data, log_debug("%s: %s @%u", __func__, c->name, w->id); TAILQ_FOREACH(wp, &w->panes, entry) { - if (window_pane_visible(wp)) + if (window_pane_is_visible(wp)) cmd_display_panes_draw_pane(ctx, wp); } } diff --git a/cmd-select-pane.c b/cmd-select-pane.c index f3c2cc12..d146ea6c 100644 --- a/cmd-select-pane.c +++ b/cmd-select-pane.c @@ -135,7 +135,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) } if (args_has(args, 'm') || args_has(args, 'M')) { - if (args_has(args, 'm') && !window_pane_visible(wp)) + if (args_has(args, 'm') && !window_pane_is_visible(wp)) return (CMD_RETURN_NORMAL); if (server_check_marked()) lastwp = marked_pane.wp; diff --git a/input-keys.c b/input-keys.c index 7d52106e..277c9e71 100644 --- a/input-keys.c +++ b/input-keys.c @@ -807,7 +807,7 @@ input_key_mouse(struct window_pane *wp, struct mouse_event *m) return; if (cmd_mouse_at(wp, m, &x, &y, 0) != 0) return; - if (!window_pane_visible(wp)) + if (!window_pane_is_visible(wp)) return; if (!input_key_get_mouse(s, m, x, y, &buf, &len)) return; diff --git a/screen-redraw.c b/screen-redraw.c index b2bfb824..022f7bf0 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -316,7 +316,7 @@ screen_redraw_cell_border(struct screen_redraw_ctx *ctx, struct window_pane *wp, * single z-index. */ TAILQ_FOREACH(wp2, &w->z_index, zentry) { - if (!window_pane_visible(wp2) || window_pane_is_floating(wp2)) + if (!window_pane_is_visible(wp2) || window_pane_is_floating(wp2)) continue; n = screen_redraw_cell_border1(ctx, sb_pos, sb_w, wp2, px, py); if (n != -1) @@ -493,7 +493,7 @@ screen_redraw_check_cell(struct screen_redraw_ctx *ctx, int px, int py, if (!window_pane_is_floating(wp)) tiled_only = 1; do { /* loop until back to wp == start */ - if (!window_pane_visible(wp)) + if (!window_pane_is_visible(wp)) goto next; if (tiled_only && window_pane_is_floating(wp)) goto next; @@ -692,7 +692,7 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx) log_debug("%s: %s @%u", __func__, c->name, w->id); TAILQ_FOREACH(wp, &w->panes, entry) { - if (!window_pane_visible(wp)) + if (!window_pane_is_visible(wp)) continue; s = &wp->status_screen; @@ -866,7 +866,7 @@ screen_redraw_pane(struct client *c, struct window_pane *wp, { struct screen_redraw_ctx ctx; - if (!window_pane_visible(wp)) + if (!window_pane_is_visible(wp)) return; screen_redraw_set_context(c, &ctx); @@ -1101,7 +1101,7 @@ screen_redraw_draw_panes(struct screen_redraw_ctx *ctx) log_debug("%s: %s @%u", __func__, c->name, w->id); TAILQ_FOREACH(wp, &w->panes, entry) { - if (window_pane_visible(wp)) + if (window_pane_is_visible(wp)) screen_redraw_draw_pane(ctx, wp); } } @@ -1221,7 +1221,7 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, int px, bb = wp->yoff + (int)wp->sy; } if (!found_self || - !window_pane_visible(wp) || + !window_pane_is_visible(wp) || py < tb || py > bb) continue; @@ -1447,7 +1447,7 @@ screen_redraw_draw_pane_scrollbars(struct screen_redraw_ctx *ctx) TAILQ_FOREACH(wp, &w->panes, entry) { if (window_pane_show_scrollbar(wp, ctx->pane_scrollbars) && - window_pane_visible(wp)) + window_pane_is_visible(wp)) screen_redraw_draw_pane_scrollbar(ctx, wp); } } diff --git a/tmux.h b/tmux.h index a45395f8..aeb555b6 100644 --- a/tmux.h +++ b/tmux.h @@ -3446,7 +3446,7 @@ int window_pane_key(struct window_pane *, struct client *, struct mouse_event *); void window_pane_paste(struct window_pane *, key_code, char *, size_t); -int window_pane_visible(struct window_pane *); +int window_pane_is_visible(struct window_pane *); int window_pane_exited(struct window_pane *); u_int window_pane_search(struct window_pane *, const char *, int, int); diff --git a/window.c b/window.c index d60177ce..c6f0d9d3 100644 --- a/window.c +++ b/window.c @@ -635,7 +635,7 @@ window_get_active_at(struct window *w, u_int x, u_int y) * bottom border. */ TAILQ_FOREACH(wp, &w->z_index, zentry) { - if (!window_pane_visible(wp) || + if (!window_pane_is_visible(wp) || window_pane_is_floating(wp)) continue; @@ -649,7 +649,7 @@ window_get_active_at(struct window *w, u_int x, u_int y) } TAILQ_FOREACH(wp, &w->z_index, zentry) { - if (!window_pane_visible(wp)) + if (!window_pane_is_visible(wp)) continue; window_pane_full_size_offset(wp, &xoff, &yoff, &sx, &sy); if (!window_pane_is_floating(wp)) { @@ -1352,7 +1352,7 @@ window_pane_copy_paste(struct window_pane *wp, char *buf, size_t len) TAILQ_EMPTY(&loop->modes) && loop->fd != -1 && (~loop->flags & PANE_INPUTOFF) && - window_pane_visible(loop) && + window_pane_is_visible(loop) && options_get_number(loop->options, "synchronize-panes")) { log_debug("%s: %.*s", __func__, (int)len, buf); bufferevent_write(loop->event, buf, len); @@ -1370,7 +1370,7 @@ window_pane_copy_key(struct window_pane *wp, key_code key) TAILQ_EMPTY(&loop->modes) && loop->fd != -1 && (~loop->flags & PANE_INPUTOFF) && - window_pane_visible(loop) && + window_pane_is_visible(loop) && options_get_number(loop->options, "synchronize-panes")) input_key_pane(loop, key, NULL); } @@ -1427,7 +1427,7 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s, } int -window_pane_visible(struct window_pane *wp) +window_pane_is_visible(struct window_pane *wp) { if (~wp->window->flags & WINDOW_ZOOMED) return (1);