e_client: modified e_client_geomentry_get to return valid x and y values when calling... 45/188745/1
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 10 Sep 2018 04:42:21 +0000 (13:42 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 10 Sep 2018 04:42:21 +0000 (13:42 +0900)
Since there was no image buffer in e_comp_object before ec was not mapped,
e_client_geomentry_get had returned (0, 0) position value. From now, it is
changed to return x and y values of ec itself instead of returning invalid
values.

Change-Id: Ie6bfcda214b9608ea18f8511eaef8a20ea9d6a7b

src/bin/e_client.c

index 6833beb..a64aed3 100644 (file)
@@ -4565,8 +4565,19 @@ e_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h)
              evas_object_geometry_get(ec->frame, &gx, &gy, &gw, &gh);
              if (gw == 0 && gh == 0)
                {
+                  /* In this case, there is no image buffer in e_comp_object, thus it
+                   * should return geometry value of ec itself. It usually happens if
+                   * new ec is not mapped yet.
+                   */
                   gw = ec->w;
                   gh = ec->h;
+
+                  if ((ec->changes.pos) &&
+                      ((gx != ec->x) || (gy != ec->y)))
+                    {
+                       gx = ec->x;
+                       gy = ec->y;
+                    }
                }
           }
         else