forked from enlightenment/efl
ok damn bsd users - u get to have no alloca - damn lowest common denominator.
SVN revision: 17626
This commit is contained in:
parent
ccc8f7236f
commit
aafe5bb24e
|
@ -1,7 +1,6 @@
|
||||||
#include "Ecore.h"
|
#include "Ecore.h"
|
||||||
#include "ecore_x_private.h"
|
#include "ecore_x_private.h"
|
||||||
#include "Ecore_X.h"
|
#include "Ecore_X.h"
|
||||||
#include <alloca.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup Ecore_X_Window_Shape X Window Shape Functions
|
* @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)
|
if (num > 0)
|
||||||
{
|
{
|
||||||
rect = alloca(sizeof(XRectangle) * num);
|
rect = malloc(sizeof(XRectangle) * num);
|
||||||
|
if (rect)
|
||||||
|
{
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
rect[i].x = rects[i].x;
|
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;
|
rect[i].height = rects[i].height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
num = 0;
|
||||||
|
}
|
||||||
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeSet, Unsorted);
|
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeSet, Unsorted);
|
||||||
|
if (rect) free(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -111,7 +116,9 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects
|
||||||
|
|
||||||
if (num > 0)
|
if (num > 0)
|
||||||
{
|
{
|
||||||
rect = alloca(sizeof(XRectangle) * num);
|
rect = malloc(sizeof(XRectangle) * num);
|
||||||
|
if (rect)
|
||||||
|
{
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
rect[i].x = rects[i].x;
|
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;
|
rect[i].height = rects[i].height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
num = 0;
|
||||||
|
}
|
||||||
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeUnion, Unsorted);
|
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeUnion, Unsorted);
|
||||||
|
if (rect) free(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ecore_X_Rectangle *
|
Ecore_X_Rectangle *
|
||||||
|
|
Loading…
Reference in New Issue