summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-09-12 13:21:09 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-09-12 13:21:04 -0400
commit4f28e49f467cd5e94b77d607ed0f3e95fc3fc6dc (patch)
tree3206dbf2e88b805e6baeb75b94a0344227a5f575
parent500b9a2eb2b28ec92ee0033cd9edc057c8443382 (diff)
downloadenlightenment-4f28e49f467cd5e94b77d607ed0f3e95fc3fc6dc.tar.gz
handle shade <-> unshade toggling in same frame
this should result in a no-op instead of a fail-op fix T6006
-rw-r--r--src/bin/e_comp_object.c50
1 files changed, 31 insertions, 19 deletions
diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index 1dc2829225..0b2f9856c3 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;