From 75902e2f0c74e0663dc20b01adac6f41a6514850 Mon Sep 17 00:00:00 2001 From: JinYong Park Date: Thu, 11 Jan 2018 16:31:06 +0900 Subject: [PATCH] ctxpopup: add animation signal emit after sizing eval. 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 --- src/mobile_lib/elc_ctxpopup.c | 18 ++++++++++-------- src/mobile_lib/elm_widget_ctxpopup.h | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/mobile_lib/elc_ctxpopup.c b/src/mobile_lib/elc_ctxpopup.c index 56ef2a2..ffb021d 100644 --- a/src/mobile_lib/elc_ctxpopup.c +++ b/src/mobile_lib/elc_ctxpopup.c @@ -1111,7 +1111,6 @@ _elm_ctxpopup_elm_layout_sizing_eval(Eo *obj, Elm_Ctxpopup_Data *sd) evas_object_move(sd->bg, x, y); evas_object_resize(sd->bg, w, h); - // resize item and set ellipsis state (only vertical mode) if (!sd->horizontal) { @@ -1129,6 +1128,12 @@ _elm_ctxpopup_elm_layout_sizing_eval(Eo *obj, Elm_Ctxpopup_Data *sd) } } } + + if (sd->visible) + if (sd->show_finished) + _visible_signals_emit(obj, sd->dir); + else + _show_signals_emit(obj, sd->dir); } static void @@ -1186,9 +1191,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 */ + */ } } @@ -1469,9 +1472,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)); @@ -1846,6 +1846,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); // @@ -1907,7 +1908,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 @@ -1980,6 +1980,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 */ diff --git a/src/mobile_lib/elm_widget_ctxpopup.h b/src/mobile_lib/elm_widget_ctxpopup.h index d70af2b..4617008 100644 --- a/src/mobile_lib/elm_widget_ctxpopup.h +++ b/src/mobile_lib/elm_widget_ctxpopup.h @@ -69,6 +69,7 @@ struct _Elm_Ctxpopup_Data Eina_Bool mouse_down : 1; //******************** TIZEN Only Eina_Bool pressed : 1; + Eina_Bool show_finished : 1; //**************************** }; -- 2.7.4