mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Ignore clients that are suspended or exiting.
This commit is contained in:
parent
57069287a1
commit
26d73a7736
6
resize.c
6
resize.c
@ -79,6 +79,8 @@ default_window_size(struct session *s, struct window *w, u_int *sx, u_int *sy,
|
|||||||
TAILQ_FOREACH(c, &clients, entry) {
|
TAILQ_FOREACH(c, &clients, entry) {
|
||||||
if (c->session == NULL)
|
if (c->session == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
if (c->flags & CLIENT_NOSIZEFLAGS)
|
||||||
|
continue;
|
||||||
if (w != NULL && !session_has(c->session, w))
|
if (w != NULL && !session_has(c->session, w))
|
||||||
continue;
|
continue;
|
||||||
if (w == NULL && c->session != s)
|
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) {
|
TAILQ_FOREACH(c, &clients, entry) {
|
||||||
if (c->session == NULL)
|
if (c->session == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
if (c->flags & CLIENT_NOSIZEFLAGS)
|
||||||
|
continue;
|
||||||
if (w != NULL && !session_has(c->session, w))
|
if (w != NULL && !session_has(c->session, w))
|
||||||
continue;
|
continue;
|
||||||
if (w == NULL && c->session != s)
|
if (w == NULL && c->session != s)
|
||||||
@ -209,7 +213,7 @@ recalculate_sizes(void)
|
|||||||
}
|
}
|
||||||
if (sx == 0 || sy == 0)
|
if (sx == 0 || sy == 0)
|
||||||
changed = 0;
|
changed = 0;
|
||||||
} else if (type == WINDOW_SIZE_SMALLEST) {
|
} else {
|
||||||
sx = sy = UINT_MAX;
|
sx = sy = UINT_MAX;
|
||||||
TAILQ_FOREACH(c, &clients, entry) {
|
TAILQ_FOREACH(c, &clients, entry) {
|
||||||
if ((s = c->session) == NULL)
|
if ((s = c->session) == NULL)
|
||||||
|
13
tmux.h
13
tmux.h
@ -1357,11 +1357,16 @@ struct client {
|
|||||||
#define CLIENT_SIZECHANGED 0x400000
|
#define CLIENT_SIZECHANGED 0x400000
|
||||||
#define CLIENT_STATUSOFF 0x800000
|
#define CLIENT_STATUSOFF 0x800000
|
||||||
#define CLIENT_REDRAWSTATUSALWAYS 0x1000000
|
#define CLIENT_REDRAWSTATUSALWAYS 0x1000000
|
||||||
#define CLIENT_ALLREDRAWFLAGS \
|
#define CLIENT_ALLREDRAWFLAGS \
|
||||||
(CLIENT_REDRAWWINDOW| \
|
(CLIENT_REDRAWWINDOW| \
|
||||||
CLIENT_REDRAWSTATUS| \
|
CLIENT_REDRAWSTATUS| \
|
||||||
CLIENT_REDRAWSTATUSALWAYS| \
|
CLIENT_REDRAWSTATUSALWAYS| \
|
||||||
CLIENT_REDRAWBORDERS)
|
CLIENT_REDRAWBORDERS)
|
||||||
|
#define CLIENT_NOSIZEFLAGS \
|
||||||
|
(CLIENT_EXIT| \
|
||||||
|
CLIENT_DEAD| \
|
||||||
|
CLIENT_SUSPENDED| \
|
||||||
|
CLIENT_DETACHING)
|
||||||
int flags;
|
int flags;
|
||||||
struct key_table *keytable;
|
struct key_table *keytable;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user