mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Bring back window_pane_visible to stop input going to panes which are
hidden by zoom.
This commit is contained in:
parent
8598fd1bc5
commit
a618271e12
@ -249,6 +249,8 @@ input_key_mouse(struct window_pane *wp, struct mouse_event *m)
|
|||||||
return;
|
return;
|
||||||
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
|
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
|
||||||
return;
|
return;
|
||||||
|
if (!window_pane_visible(wp))
|
||||||
|
return;
|
||||||
|
|
||||||
/* If this pane is not in button or all mode, discard motion events. */
|
/* If this pane is not in button or all mode, discard motion events. */
|
||||||
if (MOUSE_DRAG(m->b) &&
|
if (MOUSE_DRAG(m->b) &&
|
||||||
|
1
tmux.h
1
tmux.h
@ -2177,6 +2177,7 @@ int window_pane_set_mode(struct window_pane *,
|
|||||||
void window_pane_reset_mode(struct window_pane *);
|
void window_pane_reset_mode(struct window_pane *);
|
||||||
void window_pane_key(struct window_pane *, struct client *,
|
void window_pane_key(struct window_pane *, struct client *,
|
||||||
struct session *, key_code, struct mouse_event *);
|
struct session *, key_code, struct mouse_event *);
|
||||||
|
int window_pane_visible(struct window_pane *);
|
||||||
u_int window_pane_search(struct window_pane *, const char *);
|
u_int window_pane_search(struct window_pane *, const char *);
|
||||||
const char *window_printable_flags(struct winlink *);
|
const char *window_printable_flags(struct winlink *);
|
||||||
struct window_pane *window_pane_find_up(struct window_pane *);
|
struct window_pane *window_pane_find_up(struct window_pane *);
|
||||||
|
19
window.c
19
window.c
@ -1286,15 +1286,24 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
|
|||||||
return;
|
return;
|
||||||
if (options_get_number(wp->window->options, "synchronize-panes")) {
|
if (options_get_number(wp->window->options, "synchronize-panes")) {
|
||||||
TAILQ_FOREACH(wp2, &wp->window->panes, entry) {
|
TAILQ_FOREACH(wp2, &wp->window->panes, entry) {
|
||||||
if (wp2 == wp || wp2->mode != NULL)
|
if (wp2 != wp &&
|
||||||
continue;
|
wp2->mode == NULL &&
|
||||||
if (wp2->fd == -1 || wp2->flags & PANE_INPUTOFF)
|
wp2->fd != -1 &&
|
||||||
continue;
|
(~wp2->flags & PANE_INPUTOFF) &&
|
||||||
input_key(wp2, key, NULL);
|
window_pane_visible(wp2))
|
||||||
|
input_key(wp2, key, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
window_pane_visible(struct window_pane *wp)
|
||||||
|
{
|
||||||
|
if (~wp->window->flags & WINDOW_ZOOMED)
|
||||||
|
return (1);
|
||||||
|
return (wp == wp->window->active);
|
||||||
|
}
|
||||||
|
|
||||||
u_int
|
u_int
|
||||||
window_pane_search(struct window_pane *wp, const char *searchstr)
|
window_pane_search(struct window_pane *wp, const char *searchstr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user