Make session_attached a count and add session_many_attached flag.

This commit is contained in:
nicm
2014-03-31 21:37:55 +00:00
parent 9368914ee7
commit b11de5adc7
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) {