e_comp_object: reset and move the position of an object
authorBoram Park <boram1288.park@samsung.com>
Fri, 9 Jun 2017 07:08:15 +0000 (16:08 +0900)
committerJuyeon Lee <juyeonne.lee@samsung.com>
Tue, 13 Jun 2017 05:07:41 +0000 (14:07 +0900)
Even cw->x and cw->y are already set to -99999 value, if new value is same
with old value, cw->x and cw->y can't be changed by evas_object_move().
So only when the new position is different with old value, we reset and
move the position of an object.

Change-Id: I0dbab086cae9013ccbcb1e0595ba0d8aa61f1d5b

src/bin/e_comp_object.c

index cec8f77f2ab2b018726768875e908d900a639a8b..1be4bc68e17320355a300a6f9b5ea45fde70a9a8 100644 (file)
@@ -3835,11 +3835,13 @@ reshadow:
      _e_comp_object_shadow_setup(cw);
    do
      {
+        int old_x, old_y, new_x = 0, new_y = 0;
+
+        old_x = cw->x, old_y = cw->y;
+
         _e_comp_smart_cb_frame_recalc(cw, cw->smart_obj, NULL);
-        /* this guarantees that we won't get blocked by the NOP check in the interceptor */
-        cw->y = cw->x = -99999;
         if (pbg)
-          evas_object_move(obj, cw->ec->x, cw->ec->y);
+          new_x = cw->ec->x, new_y = cw->ec->y;
         else if (cw->ec->placed || (!cw->ec->new_client))
           {
              /* if no previous frame:
@@ -3859,7 +3861,14 @@ reshadow:
                   x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l);
                   y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t);
                }
-             evas_object_move(obj, x, y);
+             new_x = x, new_y = y;
+          }
+
+        if (old_x != new_x || old_y != new_y)
+          {
+             /* this guarantees that we won't get blocked by the NOP check in the interceptor */
+             cw->y = cw->x = -99999;
+             evas_object_move(obj, new_x, new_y);
           }
      } while (0);