changeset: 1872:15ee76804a00
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Feb 14 15:03:24 2007 -0500
summary: Fixed crash with opaque moves in floating mode.
diff -r 640887ab797a -r 15ee76804a00 view.c
--- a/view.c Wed Feb 14 13:39:37 2007 -0500
+++ b/view.c Wed Feb 14 15:03:24 2007 -0500
@@ -254,16 +254,21 @@ rects_of_view(View *v, uint *num, Frame
rects_of_view(View *v, uint *num, Frame *ignore) {
XRectangle *result;
Frame *f;
-
- *num = 2;
- for(f=v->area->frame; f; f=f->anext, (*num)++);
- result = ixp_emallocz(*num * sizeof(XRectangle));
+ int i;
+
+ i = 2;
+ for(f=v->area->frame; f; f=f->anext);
+ i++;
+ result = ixp_emallocz(i * sizeof(XRectangle));
+
+ i = 0;
for(f=v->area->frame; f; f=f->anext)
if(f != ignore)
- *result++ = f->rect;
- *result++ = screen->rect;
- *result++ = screen->brect;
- return result - *num;
+ result[i++] = f->rect;
+ result[i++] = screen->rect;
+ result[i++] = screen->brect;
+ *num = i;
+ return result;
}
/* XXX: This will need cleanup */
Received on Wed Feb 14 2007 - 21:04:33 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:19 UTC