ctxpopup: add animation signal emit after sizing eval. 25/166625/2
authorJinYong Park <j4939.park@samsung.com>
Thu, 11 Jan 2018 07:31:06 +0000 (16:31 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 11 Jan 2018 08:22:01 +0000 (08:22 +0000)
In some case, sizing eval calculate new ctxpopup direction,
but animation signal doesn't be emitted.
For example, move ctxpopup after show is called.

Change-Id: I19c4ef215853783d18f80b1469584979dbbe0fc6
Signed-off-by: JinYong Park <j4939.park@samsung.com>
src/mobile_lib/elc_ctxpopup.c
src/mobile_lib/elm_widget_ctxpopup.h

index 84b0bad..ee53485 100644 (file)
@@ -1090,6 +1090,12 @@ _elm_ctxpopup_elm_layout_sizing_eval(Eo *obj, Elm_Ctxpopup_Data *sd)
    evas_object_geometry_get(sd->parent, &x, &y, &w, &h);
    evas_object_move(sd->bg, x, y);
    evas_object_resize(sd->bg, w, h);
+
+   if (sd->visible)
+     if (sd->show_finished)
+       _visible_signals_emit(obj, sd->dir);
+     else
+       _show_signals_emit(obj, sd->dir);
 }
 
 static void
@@ -1147,9 +1153,7 @@ _on_parent_resize(void *data,
 
         /* TIZEN_ONLY(20170123): to avoid flickering problem when rotate device
         _show_signals_emit(data, sd->dir);
-        */
-        _visible_signals_emit(data, sd->dir);
-        /* END */
+         */
      }
 }
 
@@ -1427,9 +1431,6 @@ _elm_ctxpopup_elm_widget_theme_apply(Eo *obj, Elm_Ctxpopup_Data *sd)
         edje_object_message_signal_process(VIEW(item));
      }
 
-   if (evas_object_visible_get(sd->bg))
-     edje_object_signal_emit(sd->bg, "elm,state,show", "elm");
-
    if (sd->scr)
      {
         elm_layout_theme_set(sd->scr, "scroller", "ctxpopup", elm_widget_style_get(obj));
@@ -1791,6 +1792,7 @@ _on_show(void *data EINA_UNUSED,
    ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
 
    sd->visible = EINA_TRUE;
+   sd->show_finished = EINA_FALSE;
    //TIZEN_ONLY(20170919): Handle default label object
    _elm_win_default_label_obj_append(obj);
    //
@@ -1850,7 +1852,6 @@ _on_show(void *data EINA_UNUSED,
    elm_layout_sizing_eval(obj);
 
    elm_object_focus_set(obj, EINA_TRUE);
-   _show_signals_emit(obj, sd->dir);
 }
 
 EOLIAN static void
@@ -1912,6 +1913,8 @@ _show_finished_cb(void *data,
                   const char *emission EINA_UNUSED,
                   const char *source EINA_UNUSED)
 {
+   ELM_CTXPOPUP_DATA_GET(obj, sd);
+   sd->show_finished = EINA_TRUE;
    elm_object_focus_set(data, EINA_TRUE);
 }
 /* END */
index d70af2b..4617008 100644 (file)
@@ -69,6 +69,7 @@ struct _Elm_Ctxpopup_Data
    Eina_Bool              mouse_down : 1;
 //******************** TIZEN Only
    Eina_Bool              pressed : 1;
+   Eina_Bool              show_finished : 1;
 //****************************
 };