summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2019-06-11 13:09:00 +0000
committernicm <nicm>2019-06-11 13:09:00 +0000
commit1a9f9c09b4bcc9f99f10190ab91f1aea5206809b (patch)
treede4eb00f650b925d5609ec9f64722993b41151f8 /server-client.c
parent915097d312319a463fa4333c9bdf728b8dd6d39d (diff)
Do not resize panes unless they are in an attached, active window. From
Morten M Neergaard in GitHub issue 1782.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/server-client.c b/server-client.c
index fa21fa79..dc57e523 100644
--- a/server-client.c
+++ b/server-client.c
@@ -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);