summaryrefslogtreecommitdiffstats
path: root/resize.c
diff options
context:
space:
mode:
authornicm <nicm>2018-08-18 20:08:52 +0000
committernicm <nicm>2018-08-18 20:08:52 +0000
commitbd2896b65e8fd205e3207ed70558d9ebfd106909 (patch)
tree1001e1beeb6e0cf1332e246af8bcbdc4898c9803 /resize.c
parent3bc08b0dc0c9868ba5acaa7b8f12159a9a66cf4a (diff)
SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.
Diffstat (limited to 'resize.c')
-rw-r--r--resize.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/resize.c b/resize.c
index 8ed359b4..1c9694da 100644
--- a/resize.c
+++ b/resize.c
@@ -36,10 +36,6 @@
*
* This is quite inefficient - better/additional data structures are needed
* to make it better.
- *
- * As a side effect, this function updates the SESSION_UNATTACHED flag. This
- * flag is necessary to make sure unattached sessions do not limit the size of
- * windows that are attached both to them and to other (attached) sessions.
*/
void
@@ -79,11 +75,8 @@ recalculate_sizes(void)
s->attached++;
}
}
- if (ssx == UINT_MAX || ssy == UINT_MAX) {
- s->flags |= SESSION_UNATTACHED;
+ if (ssx == UINT_MAX || ssy == UINT_MAX)
continue;
- }
- s->flags &= ~SESSION_UNATTACHED;
if (lines != 0 && ssy == 0)
ssy = lines;
@@ -107,7 +100,7 @@ recalculate_sizes(void)
ssx = ssy = UINT_MAX;
RB_FOREACH(s, sessions, &sessions) {
- if (s->flags & SESSION_UNATTACHED)
+ if (s->attached == 0)
continue;
if (flag)
has = s->curw->window == w;