Fixed windows snapping to the screen edge

This commit is contained in:
Kris Maglione 2006-05-31 04:12:40 -04:00
parent 4904a19aae
commit 45507b607c
1 changed files with 3 additions and 2 deletions

View File

@ -114,13 +114,14 @@ rects_of_view(View *v, unsigned int *num)
XRectangle *result = nil;
unsigned int i;
*num = v->area.data[0]->frame.size + 1;
*num = v->area.data[0]->frame.size + 2;
if(*num) {
result = cext_emallocz(*num * sizeof(XRectangle));
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;
result[*num - 1] = rect;
result[*num - 2] = brect;
}
return result;
}