diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-06 20:02:27 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-06 20:02:27 +0000 |
commit | 367e002bc20d369c59e40ef1522a1f4aed63407c (patch) | |
tree | 8d126cebdd7627944250252c9cecf389ea128f44 /resize.c | |
parent | 3cd4a08ffb4bcba0cfbb8a29574ff40d134dc186 (diff) | |
download | rtmux-367e002bc20d369c59e40ef1522a1f4aed63407c.tar.gz rtmux-367e002bc20d369c59e40ef1522a1f4aed63407c.tar.bz2 rtmux-367e002bc20d369c59e40ef1522a1f4aed63407c.zip |
New flag: aggressize resize. Resize window when to size of smallest session for which it is _current_ window.
Diffstat (limited to 'resize.c')
-rw-r--r-- | resize.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: resize.c,v 1.11 2008-06-03 21:42:37 nicm Exp $ */ +/* $Id: resize.c,v 1.12 2008-06-06 20:02:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -48,7 +48,7 @@ recalculate_sizes(void) struct session *s; struct client *c; struct window *w; - u_int i, j, ssx, ssy, slines; + u_int i, j, ssx, ssy, slines, has; for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { s = ARRAY_ITEM(&sessions, i); @@ -97,7 +97,11 @@ recalculate_sizes(void) s = ARRAY_ITEM(&sessions, j); if (s == NULL || s->flags & SESSION_UNATTACHED) continue; - if (session_has(s, w)) { + if (w->flags & WINDOW_AGGRESSIVE) + has = s->curw->window == w; + else + has = session_has(s, w); + if (has) { if (s->sx < ssx) ssx = s->sx; if (s->sy < ssy) |