Make session_attached a count and add session_many_attached flag.

This commit is contained in:
Nicholas Marriott
2014-03-06 11:25:27 +00:00
parent b65c72c45c
commit b7f6356053
4 changed files with 8 additions and 5 deletions

View File

@@ -55,6 +55,7 @@ recalculate_sizes(void)
RB_FOREACH(s, sessions, &sessions) {
has_status = options_get_number(&s->options, "status");
s->attached = 0;
ssx = ssy = UINT_MAX;
for (j = 0; j < ARRAY_LENGTH(&clients); j++) {
c = ARRAY_ITEM(&clients, j);
@@ -69,6 +70,7 @@ recalculate_sizes(void)
ssy = c->tty.sy - 1;
else if (c->tty.sy < ssy)
ssy = c->tty.sy;
s->attached++;
}
}
if (ssx == UINT_MAX || ssy == UINT_MAX) {