summaryrefslogtreecommitdiffstats
path: root/resize.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-06 20:02:27 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-06 20:02:27 +0000
commit367e002bc20d369c59e40ef1522a1f4aed63407c (patch)
tree8d126cebdd7627944250252c9cecf389ea128f44 /resize.c
parent3cd4a08ffb4bcba0cfbb8a29574ff40d134dc186 (diff)
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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/resize.c b/resize.c
index c3be5719..733156db 100644
--- a/resize.c
+++ b/resize.c
@@ -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)