diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2011-02-13 17:25:21 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2011-02-13 17:25:21 +0000 |
commit | 857d7553389aceda4343be1ba99dc271690eadcb (patch) | |
tree | 73474e15f59476f132fdc972add280a1169ac0b4 /app | |
parent | 6998fd23ba8b547887c9ba0cab17b6d36c6f2e42 (diff) |
we lose track of highstack somewhere, so recompute it before we need it.
fixes a crash reported by christian neukirchen. ok okan
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/group.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/cwm/group.c b/app/cwm/group.c index 6fdfe9536..d18541452 100644 --- a/app/cwm/group.c +++ b/app/cwm/group.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: group.c,v 1.48 2010/09/25 20:01:27 okan Exp $ + * $Id: group.c,v 1.49 2011/02/13 17:25:20 tedu Exp $ */ #include <sys/param.h> @@ -108,6 +108,11 @@ group_show(struct screen_ctx *sc, struct group_ctx *gc) u_int i; int lastempty = -1; + gc->highstack = 0; + TAILQ_FOREACH(cc, &gc->clients, group_entry) { + if (cc->stackingorder > gc->highstack) + gc->highstack = cc->stackingorder; + } winlist = (Window *) xcalloc(sizeof(*winlist), (gc->highstack + 1)); /* |