Ecore_X: Fix building without shape extension (rects was undefined, as
authorChristopher Michael <cpmichael1@comcast.net>
Tue, 31 May 2011 19:28:30 +0000 (19:28 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Tue, 31 May 2011 19:28:30 +0000 (19:28 +0000)
was the variable i).

SVN revision: 59854

legacy/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c

index 51c2010..6bbc864 100644 (file)
@@ -585,9 +585,9 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
 EAPI Ecore_X_Rectangle *
 ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
 {
+   Ecore_X_Rectangle *rects = NULL;
 #ifdef ShapeInput
    XRectangle *rect;
-   Ecore_X_Rectangle *rects = NULL;
    int i, num = 0, ord;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -627,8 +627,8 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
    rects = malloc(sizeof(Ecore_X_Rectangle));
    if (!rects) return NULL;
    if (!XGetGeometry(_ecore_x_disp, win, &dw,
-                     &(rects[i].x), &(rects[i].y),
-                     &(rects[i].width), &(rects[i].height),
+                     &(rects[0].x), &(rects[0].y),
+                     &(rects[0].width), &(rects[0].height),
                      &di, &di))
      {
         free(rects);