notify: fix hide animation logic for popup

Summary:
When popup is timeout, notify call hide func, and send time out event to popup.
After popup receiving time out event, popup hide object again,
so hide animation doesn't show.
And notify hide function doesn't send hide signal to block events part,
(but dismiss function send it)
So add that signal.

Test Plan:
 1. elementary_test -to popup
 2. click first item, "popup+center+text"
 3. compare time out event before this patch and after.

@fix

Reviewers: herb, singh.amitesh, Hermet, cedric, raster, jpeg

Differential Revision: https://phab.enlightenment.org/D4780

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
JinYong Park 2017-04-12 14:25:51 -07:00 committed by Cedric BAIL
parent 4b09ad7d6b
commit 86008fa411
2 changed files with 6 additions and 2 deletions

View File

@ -134,7 +134,7 @@ _popup_center_text_cb(void *data, Evas_Object *obj EINA_UNUSED,
elm_object_text_set(popup, "This Popup has content area and "
"timeout value is 3 seconds");
elm_popup_timeout_set(popup, 3.0);
evas_object_smart_callback_add(popup, "timeout", _response_cb, popup);
evas_object_smart_callback_add(popup, "dismissed", _response_cb, popup);
evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN,
_popup_key_down_cb, NULL);

View File

@ -270,6 +270,7 @@ _timer_cb(void *data)
if (!evas_object_visible_get(obj)) goto end;
evas_object_hide(obj);
sd->in_timeout = EINA_TRUE;
efl_event_callback_legacy_call(obj, ELM_NOTIFY_EVENT_TIMEOUT, NULL);
end:
@ -312,7 +313,10 @@ _elm_notify_hide(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd)
if (eina_streq(hide_signal, "on"))
{
if (!sd->in_timeout)
edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
{
elm_layout_signal_emit(sd->block_events, "elm,state,hide", "elm");
edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
}
}
else //for backport supporting: edc without emitting hide finished signal
{