e_comp_object: add e_comp_object_effect_hiding_set 33/213333/3 accepted/tizen/unified/20190905.060608 submit/tizen/20190905.021322
authorJuyeon Lee <juyeonne.lee@samsung.com>
Wed, 4 Sep 2019 08:18:46 +0000 (17:18 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Thu, 5 Sep 2019 02:12:06 +0000 (02:12 +0000)
ec->frame never hide when it is animating(bg running, restack showing)
if evas object changes its visibility state, comp_obj emit the signal
   show: state,hidden/action,iconify
   hide: state,visible/action,uniconify
if evas stack has changed than, E-mod effect emit the signal
   show: restack,show
   hide: restack,hide
window transition animation(aka effect) is calculated by the e_mod_effect mod.
refering to signals. therefore it is hard to know in e20 side what is animating
By effect mod set hiding state using this api, intercept hide can process
'hide' unless it is not hiding animation.

Change-Id: Ia580f36270463314f16455dd16f6a6bdf4b94b12

src/bin/e_comp_object.c
src/bin/e_comp_object.h

index 7dcc8c6f22ae43a5c53b85fce5fe32f6e37efd24..40e3828e0ebe3ecb370cac1d481a2eb8e21b5bd9 100644 (file)
@@ -110,6 +110,7 @@ typedef struct _E_Comp_Object
    Eina_Bool            delete_pending : 1;  // delete pending
    Eina_Bool            defer_hide : 1;  // flag to get hide to work on deferred hide
    Eina_Bool            showing : 1;  // object is currently in "show" animation
+   Eina_Bool            hiding : 1;   // object is currently in "hide" animation
    Eina_Bool            visible : 1;  // is visible
 
    Eina_Bool            shaped : 1;  // is shaped
@@ -1127,7 +1128,7 @@ _e_comp_object_animating_end(E_Comp_Object *cw)
                     }
                }
              e_comp->animating--;
-             cw->showing = 0;
+             cw->showing = cw->hiding = 0;
              UNREFD(cw->ec, 2);
              if (e_comp->animating == 0)
                e_client_visibility_calculate();
@@ -2098,7 +2099,7 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
         return;
      }
    /* already hidden or currently animating */
-   if ((!cw->visible) || (cw->animating && (!cw->showing) && (!cw->ec->iconic))) return;
+   if ((!cw->visible) || (cw->animating && cw->hiding && (!cw->ec->iconic))) return;
 
    /* don't try hiding during shutdown */
    cw->defer_hide |= stopping;
@@ -2107,7 +2108,7 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
         if ((!cw->ec->iconic) && (!cw->ec->override))
           /* unset delete requested so the client doesn't break */
           cw->ec->delete_requested = 0;
-        if ((!cw->animating) || cw->showing || cw->ec->iconic)
+        if ((!cw->animating) || (!cw->hiding) || cw->ec->iconic)
           {
              if (cw->ec->iconic)
                e_comp_object_signal_emit(obj, "e,action,iconify", "e");
@@ -2915,6 +2916,7 @@ _e_comp_smart_hide(Evas_Object *obj)
 
    INTERNAL_ENTRY;
    cw->visible = 0;
+   cw->hiding = 0;
    evas_object_hide(cw->clip);
    if (cw->input_obj) evas_object_hide(cw->input_obj);
    evas_object_hide(cw->effect_obj);
@@ -5019,6 +5021,19 @@ e_comp_object_effect_object_get(Evas_Object *obj)
 
    return cw->effect_obj;
 }
+
+E_API Eina_Bool
+e_comp_object_effect_hiding_set(Evas_Object *obj, Eina_Bool set)
+{
+   API_ENTRY EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
+   if (!cw->effect_set) return EINA_FALSE;
+
+   cw->hiding = set;
+
+   return EINA_TRUE;
+}
+
 ////////////////////////////////////
 
 static void
index 102e8fad29938392efea1098332b8a2bbcf13cf3..2a0ac375dd2c01c61f248c9a35469075eb19a40c 100644 (file)
@@ -179,6 +179,7 @@ E_API Eina_Bool e_comp_object_hwc_update_exists(Evas_Object *obj);
 E_API void e_comp_object_hwc_update_set(Evas_Object *obj, Eina_Bool set);
 
 E_API Eina_Bool e_comp_object_effect_object_part_swallow(Evas_Object *obj, const char *part_name, Evas_Object *swallow_obj);
+E_API Eina_Bool e_comp_object_effect_hiding_set(Evas_Object *obj, Eina_Bool set);
 
 E_API void e_comp_object_indicator_swallow(Evas_Object *obj, Evas_Object *indicator);
 E_API void e_comp_object_indicator_unswallow(Evas_Object *obj, Evas_Object *indicator);