From 2d6a829fe78effdb19ec274756aff8533d1ae22c Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Tue, 30 May 2006 11:13:32 +0200 Subject: [PATCH] fixed rects_of_view --- cmd/wm/view.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/wm/view.c b/cmd/wm/view.c index 13bd48c0..4f7fd46c 100644 --- a/cmd/wm/view.c +++ b/cmd/wm/view.c @@ -114,13 +114,12 @@ rects_of_view(View *v, unsigned int *num) XRectangle *result = nil; unsigned int i; - *num = 0; *num = v->area.data[0]->frame.size + 1; if(*num) { result = cext_emallocz(*num * sizeof(XRectangle)); - for(i = 0; i < *num; i++) - result[i] = v->area.data[0]->frame.data[0]->rect; + for(i = 0; i < v->area.data[0]->frame.size; i++) + result[i] = v->area.data[0]->frame.data[i]->rect; result[*num - 1] = brect; } return result;