discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=4f28e49f467cd5e94b77d607ed0f3e95fc3fc6dc

commit 4f28e49f467cd5e94b77d607ed0f3e95fc3fc6dc
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Sep 12 13:21:09 2017 -0400

    handle shade <-> unshade toggling in same frame
    
    this should result in a no-op instead of a fail-op
    
    fix T6006
---
 src/bin/e_comp_object.c | 50 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 19 deletions(-)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index 1dc282922..0b2f9856c 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -2118,22 +2118,6 @@ _e_comp_object_shade_animator(void *data)
 }
 
 static void
-_e_comp_smart_cb_shading(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   E_FREE_FUNC(cw->shade.anim, ecore_animator_del);
-
-   cw->shade.x = cw->x;
-   cw->shade.y = cw->y;
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,shading", "e");
-   cw->shade.start = ecore_loop_time_get();
-   cw->shade.dir = (E_Direction)event_info;
-   cw->shade.anim = ecore_animator_add(_e_comp_object_shade_animator, cw);
-}
-
-static void
 _e_comp_smart_cb_shaded(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info)
 {
    E_Comp_Object *cw = data;
@@ -2148,16 +2132,24 @@ _e_comp_smart_cb_shaded(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_in
 }
 
 static void
-_e_comp_smart_cb_unshading(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info)
+_e_comp_smart_cb_shading(void *data, Evas_Object *obj, void *event_info)
 {
    E_Comp_Object *cw = data;
 
    if (!cw->ec) return; //NYI
+   if (cw->shade.anim && EINA_DBL_EQ(cw->shade.val, 0.0))
+     {
+        cw->ec->shaded = 0;
+        _e_comp_smart_cb_shaded(data, obj, event_info);
+        return;
+     }
    E_FREE_FUNC(cw->shade.anim, ecore_animator_del);
 
-   cw->shade.dir = (E_Direction)event_info;
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,unshading", "e");
+   cw->shade.x = cw->x;
+   cw->shade.y = cw->y;
+   e_comp_object_signal_emit(cw->smart_obj, "e,state,shading", "e");
    cw->shade.start = ecore_loop_time_get();
+   cw->shade.dir = (E_Direction)event_info;
    cw->shade.anim = ecore_animator_add(_e_comp_object_shade_animator, cw);
 }
 
@@ -2187,6 +2179,26 @@ _e_comp_smart_cb_unshaded(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_
 }
 
 static void
+_e_comp_smart_cb_unshading(void *data, Evas_Object *obj, void *event_info)
+{
+   E_Comp_Object *cw = data;
+
+   if (!cw->ec) return; //NYI
+   if (cw->shade.anim && EINA_DBL_EQ(cw->shade.val, 0.0))
+     {
+        cw->ec->shaded = 1;
+        _e_comp_smart_cb_unshaded(data, obj, event_info);
+        return;
+     }
+   E_FREE_FUNC(cw->shade.anim, ecore_animator_del);
+
+   cw->shade.dir = (E_Direction)event_info;
+   e_comp_object_signal_emit(cw->smart_obj, "e,state,unshading", "e");
+   cw->shade.start = ecore_loop_time_get();
+   cw->shade.anim = ecore_animator_add(_e_comp_object_shade_animator, cw);
+}
+
+static void
 _e_comp_smart_cb_maximize(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
    E_Comp_Object *cw = data;

-- 


Reply via email to