ok damn bsd users - u get to have no alloca - damn lowest common denominator.

SVN revision: 17626
This commit is contained in:
Carsten Haitzler 2005-10-17 09:59:23 +00:00
parent ccc8f7236f
commit aafe5bb24e
1 changed files with 24 additions and 13 deletions

View File

@ -1,7 +1,6 @@
#include "Ecore.h"
#include "ecore_x_private.h"
#include "Ecore_X.h"
#include <alloca.h>
/**
* @defgroup Ecore_X_Window_Shape X Window Shape Functions
@ -55,7 +54,9 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects
if (num > 0)
{
rect = alloca(sizeof(XRectangle) * num);
rect = malloc(sizeof(XRectangle) * num);
if (rect)
{
for (i = 0; i < num; i++)
{
rect[i].x = rects[i].x;
@ -64,7 +65,11 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects
rect[i].height = rects[i].height;
}
}
else
num = 0;
}
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeSet, Unsorted);
if (rect) free(rect);
}
void
@ -111,7 +116,9 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects
if (num > 0)
{
rect = alloca(sizeof(XRectangle) * num);
rect = malloc(sizeof(XRectangle) * num);
if (rect)
{
for (i = 0; i < num; i++)
{
rect[i].x = rects[i].x;
@ -120,7 +127,11 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects
rect[i].height = rects[i].height;
}
}
else
num = 0;
}
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeUnion, Unsorted);
if (rect) free(rect);
}
Ecore_X_Rectangle *