discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3413399b156b6874c8181fd79716974127b01855

commit 3413399b156b6874c8181fd79716974127b01855
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Sat Mar 12 11:17:32 2016 -0500

    always move objects during efx_resize if position is provided
    
    some objects (like clients) may lie about their geometries and report
    wrong values
---
 src/bin/efx/efx_resize.c | 71 ++++++++++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 33 deletions(-)

diff --git a/src/bin/efx/efx_resize.c b/src/bin/efx/efx_resize.c
index 9cdb5e2..ee07505 100644
--- a/src/bin/efx/efx_resize.c
+++ b/src/bin/efx/efx_resize.c
@@ -181,43 +181,48 @@ e_efx_resize(Evas_Object *obj, E_Efx_Effect_Speed speed, 
const Evas_Point *posit
    if (e->move_data)
      x = e->x, y = e->y;
    INF("resize: %p || %dx%d => %dx%d %s over %gs", obj, erd->start_w, 
erd->start_h, w, h, e_efx_speed_str[speed], total_time);
-   if (position && ((position->x != x) || (position->y != y)))
+   if (position)
      {
-        Evas_Point tr, bl, br;
-        Evas_Point atr, abl, abr;
-
-        tr = (Evas_Point){x + erd->start_w, y};
-        bl = (Evas_Point){x, y + erd->start_h};
-        br = (Evas_Point){x + erd->start_w, y + erd->start_h};
-        atr = (Evas_Point){position->x + w, position->y};
-        abl = (Evas_Point){position->x, position->y + h};
-        abr = (Evas_Point){position->x + w, position->y + h};
-        if (!memcmp(&tr, &atr, sizeof(Evas_Point)))
+        if ((position->x != x) || (position->y != y))
           {
-             erd->anchor_type = TOP_RIGHT;
-             erd->anchor = tr;
-          }
-        else if (!memcmp(&bl, &abl, sizeof(Evas_Point)))
-          {
-             erd->anchor_type = BOTTOM_LEFT;
-             erd->anchor = bl;
-          }
-        else if (!memcmp(&br, &abr, sizeof(Evas_Point)))
-          {
-             erd->anchor_type = BOTTOM_RIGHT;
-             erd->anchor = br;
-          }
-
-        if (!e_efx_move(obj, speed, position, total_time, NULL, NULL))
-          {
-             evas_object_event_callback_del_full(obj, EVAS_CALLBACK_FREE, 
(Evas_Object_Event_Cb)_obj_del, e->resize_data);
-             free(erd);
-             e->resize_data = NULL;
-             e_efx_free(e);
-             return EINA_FALSE;
+             Evas_Point tr, bl, br;
+             Evas_Point atr, abl, abr;
+
+             tr = (Evas_Point){x + erd->start_w, y};
+             bl = (Evas_Point){x, y + erd->start_h};
+             br = (Evas_Point){x + erd->start_w, y + erd->start_h};
+             atr = (Evas_Point){position->x + w, position->y};
+             abl = (Evas_Point){position->x, position->y + h};
+             abr = (Evas_Point){position->x + w, position->y + h};
+             if (!memcmp(&tr, &atr, sizeof(Evas_Point)))
+               {
+                  erd->anchor_type = TOP_RIGHT;
+                  erd->anchor = tr;
+               }
+             else if (!memcmp(&bl, &abl, sizeof(Evas_Point)))
+               {
+                  erd->anchor_type = BOTTOM_LEFT;
+                  erd->anchor = bl;
+               }
+             else if (!memcmp(&br, &abr, sizeof(Evas_Point)))
+               {
+                  erd->anchor_type = BOTTOM_RIGHT;
+                  erd->anchor = br;
+               }
+
+             if (!e_efx_move(obj, speed, position, total_time, NULL, NULL))
+               {
+                  evas_object_event_callback_del_full(obj, EVAS_CALLBACK_FREE, 
(Evas_Object_Event_Cb)_obj_del, e->resize_data);
+                  free(erd);
+                  e->resize_data = NULL;
+                  e_efx_free(e);
+                  return EINA_FALSE;
+               }
+             else
+               erd->moving = 1;
           }
         else
-          erd->moving = 1;
+          evas_object_move(obj, position->x, position->y);
      }
    if (total_time)
      erd->anim = ecore_animator_timeline_add(total_time, 
(Ecore_Timeline_Cb)_resize_cb, erd);

-- 


Reply via email to