diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-09-25 09:48:48 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-09-25 09:48:48 +0100 |
commit | 26d73a7736bf6c8560f90c7ae75963a02b4c9ba9 (patch) | |
tree | f9756ed92d77c1f5667aba65e413f3db847fa170 | |
parent | 57069287a11cc208647f699a87aa7bf526716668 (diff) | |
download | rtmux-26d73a7736bf6c8560f90c7ae75963a02b4c9ba9.tar.gz rtmux-26d73a7736bf6c8560f90c7ae75963a02b4c9ba9.tar.bz2 rtmux-26d73a7736bf6c8560f90c7ae75963a02b4c9ba9.zip |
Ignore clients that are suspended or exiting.
-rw-r--r-- | resize.c | 6 | ||||
-rw-r--r-- | tmux.h | 13 |
2 files changed, 14 insertions, 5 deletions
@@ -79,6 +79,8 @@ default_window_size(struct session *s, struct window *w, u_int *sx, u_int *sy, TAILQ_FOREACH(c, &clients, entry) { if (c->session == NULL) continue; + if (c->flags & CLIENT_NOSIZEFLAGS) + continue; if (w != NULL && !session_has(c->session, w)) continue; if (w == NULL && c->session != s) @@ -99,6 +101,8 @@ default_window_size(struct session *s, struct window *w, u_int *sx, u_int *sy, TAILQ_FOREACH(c, &clients, entry) { if (c->session == NULL) continue; + if (c->flags & CLIENT_NOSIZEFLAGS) + continue; if (w != NULL && !session_has(c->session, w)) continue; if (w == NULL && c->session != s) @@ -209,7 +213,7 @@ recalculate_sizes(void) } if (sx == 0 || sy == 0) changed = 0; - } else if (type == WINDOW_SIZE_SMALLEST) { + } else { sx = sy = UINT_MAX; TAILQ_FOREACH(c, &clients, entry) { if ((s = c->session) == NULL) @@ -1357,11 +1357,16 @@ struct client { #define CLIENT_SIZECHANGED 0x400000 #define CLIENT_STATUSOFF 0x800000 #define CLIENT_REDRAWSTATUSALWAYS 0x1000000 -#define CLIENT_ALLREDRAWFLAGS \ - (CLIENT_REDRAWWINDOW| \ - CLIENT_REDRAWSTATUS| \ - CLIENT_REDRAWSTATUSALWAYS| \ +#define CLIENT_ALLREDRAWFLAGS \ + (CLIENT_REDRAWWINDOW| \ + CLIENT_REDRAWSTATUS| \ + CLIENT_REDRAWSTATUSALWAYS| \ CLIENT_REDRAWBORDERS) +#define CLIENT_NOSIZEFLAGS \ + (CLIENT_EXIT| \ + CLIENT_DEAD| \ + CLIENT_SUSPENDED| \ + CLIENT_DETACHING) int flags; struct key_table *keytable; |