summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-06-11 13:09:01 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-06-11 13:09:01 +0000
commita44844989f52f09f4b3de69063e69f78df31bc1f (patch)
tree2fd1bfd12e307e57cf510d5a958cdc0a11ae4615
parentdd6ae7182489d0084e5041ed0cae6612d0244258 (diff)
Do not resize panes unless they are in an attached, active window. From
Morten M Neergaard in GitHub issue 1782.
-rw-r--r--usr.bin/tmux/server-client.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 8c8eb23562b..9e7b675ac6d 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.286 2019/06/07 20:09:17 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.287 2019/06/11 13:09:00 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1241,6 +1241,8 @@ server_client_loop(void)
struct client *c;
struct window *w;
struct window_pane *wp;
+ struct winlink *wl;
+ struct session *s;
int focus;
TAILQ_FOREACH(c, &clients, entry) {
@@ -1257,8 +1259,13 @@ server_client_loop(void)
*/
focus = options_get_number(global_options, "focus-events");
RB_FOREACH(w, windows, &windows) {
+ TAILQ_FOREACH(wl, &w->winlinks, wentry) {
+ s = wl->session;
+ if (s->attached != 0 && s->curw == wl)
+ break;
+ }
TAILQ_FOREACH(wp, &w->panes, entry) {
- if (wp->fd != -1) {
+ if (wl != NULL && wp->fd != -1) {
if (focus)
server_client_check_focus(wp);
server_client_check_resize(wp);